1. A method for partitioning a document, the method comprising: while scanning a hybrid markup language document: recording, by a processor, opening tags in a tag stack; deleting, by the processor, a selected opening tag from the tag stack responsive to detecting a closing tag corresponding to the selected opening tag; responsive to detecting a first partition boundary: copying, by the processor, content in the hybrid markup language document that precedes the first partition boundary to an output markup language document; splitting, by the processor, the hybrid markup language document at the first partition boundary, wherein the splitting comprises discarding the content in the hybrid markup language document that precedes the first partition boundary and replacing the content in the output markup language document with remaining content occurring after the first partition boundary; and generating, by the processor, closing tags corresponding to the opening tags in the remaining content in the output markup language document.
1. A method for partitioning a document, the method comprising: while scanning a hybrid markup language document: recording, by a processor, opening tags in a tag stack; deleting, by the processor, a selected opening tag from the tag stack responsive to detecting a closing tag corresponding to the selected opening tag; responsive to detecting a first partition boundary: copying, by the processor, content in the hybrid markup language document that precedes the first partition boundary to an output markup language document; splitting, by the processor, the hybrid markup language document at the first partition boundary, wherein the splitting comprises discarding the content in the hybrid markup language document that precedes the first partition boundary and replacing the content in the output markup language document with remaining content occurring after the first partition boundary; and generating, by the processor, closing tags corresponding to the opening tags in the remaining content in the output markup language document. 7. The method according to claim 1 , further comprising recording state information in the tag stack.