摘要:
A method and apparatus are provided for converting a first document to a second document. The first document is in a first extended attribute grammar, while the second document is in a second extended attribute grammar. An extended attribute coupling grammar couples the first and second extended attribute grammars. The first document is converted to a first tree, which is partially copied to a first copy. The first copy is completed by evaluating it's attribute with respect to the extended attribute coupling grammar. The first copy is then a partially attributed tree of the second document. The partially attributed tree is completed to form a second tree based on the second extended attribute grammar. The second tree is then converted to the second document.
摘要:
A method and apparatus are provided for specifying layout processing of logically structured documents, that is, specific logical structures, in computer document handling systems. The method and apparatus allow the specification of the generic logical structure of the structured document in terms of relational attribute grammars. According to the invention, these relational attributes have a binary relationship. The generic layout structure for a class of structural documents is also represented in terms of relational attribute grammars. Coordination grammars, also represented in terms of relational attribute grammars, link the elements of the generic logical structure to the generic layout structure. By coordinating the generic layout and generic logical structures, many solutions are available. Preferential specifications are developed to resolve any potential ambiguities between the many solutions, and to select a preferred solution. The specific logical structure is then generated into a specific layout structure using the preferential specifications to resolve any ambiguities occurring as a result of the coordination.