Markup-language document formatting in memory-constrained environment
First Claim
1. A method of parsing and formatting a document encoded using a markup language, the structure of said document being represented by a tree having one or more nodes, said method comprising the steps of:
- parsing the document to a current node in said tree using a main parser, freeing memory occupied by an previously formatted one of said nodes upon which formatting of said current node, according to a set of formatting rules, is independent and the formatting of said current node being dependent on one or more further nodes that have not yet been formatted, wherein a partial document tree uses the current node and remaining previously formatted nodes upon which formatting of said current node is dependent;
obtaining information about said one or more further nodes of said document using a look-ahead parser operable so as to not interfere with operation of the main parser; and
formatting said current node using said obtained information.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods (600, 700, 900), apparatuses and computer program products are disclosed for parsing and formatting a document encoded using a markup language in a memory-constrained environment. The structure (100) of the document is represented by a tree having one or more nodes (n1-n10). One method (600) includes the steps of, for a current one of the nodes, freeing memory occupied by any previously formatted one of the nodes upon which formatting of the current node, according to a set of formatting rules, is independent; and building a partial document tree (500) using the current node and remaining previously formatted nodes upon which formatting of the current node, according to the set of formatting rules, is dependent. Another method includes the steps of obtaining information about one or more nodes of the document using a lookahead parser, and formatting the one or more nodes using the obtained information.
-
Citations
18 Claims
-
1. A method of parsing and formatting a document encoded using a markup language, the structure of said document being represented by a tree having one or more nodes, said method comprising the steps of:
-
parsing the document to a current node in said tree using a main parser, freeing memory occupied by an previously formatted one of said nodes upon which formatting of said current node, according to a set of formatting rules, is independent and the formatting of said current node being dependent on one or more further nodes that have not yet been formatted, wherein a partial document tree uses the current node and remaining previously formatted nodes upon which formatting of said current node is dependent; obtaining information about said one or more further nodes of said document using a look-ahead parser operable so as to not interfere with operation of the main parser; and formatting said current node using said obtained information. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An apparatus for parsing and formatting a document encoded using a markup language, the structure of said document being represented by a tree having one or more nodes, said apparatus comprising:
-
a memory device; a main parser for parsing said document to a current node in said tree and freeing memory of the memory device occupied by any previously formatted one of said nodes upon which formatting of said current node, according to a set of formatting rules, is independent, the formatting of said current node being dependent on one or more further nodes that have not yet been formatted, the main parser further forming a partial document tree that uses the current node and remaining previously formatted nodes upon which formatting of said current node is dependent; an obtaining unit for obtaining information about said one or more further nodes of said document using a look-ahead parser operable so as to not interfere with operation of the main parser; and a formatting unit for formatting said current node using said obtained information. - View Dependent Claims (10, 11, 12, 13)
-
-
14. A computer readable storage medium having a computer program recorded therein for parsing and formatting a document encoded using a markup language, the structure of said document being represented by a tree having one or more nodes, said computer program comprising the steps of:
-
parsing said document to a current node in said tree using a main parser, freeing memory occupied by any previously formatted one of said nodes upon which formatting of said current node, according to a set of formatting rules, is independent, and the formatting of said current node being dependent on one or more further nodes that have not yet been formatted, wherein a partial document tree uses the current node and remaining previously formatted nodes upon which formatting of said current node is dependent; obtaining information about said one or more further nodes of said document using a look-ahead parser operable so as to not interfere with operation of the main parser; and formatting said current node using said obtained information. - View Dependent Claims (15, 16, 17, 18)
-
Specification