Word processor for freestyle editing of well-formed XML documents
View Patent ↗A word-processor that provides a freestyle-editing environment for editing an XML document while monitoring the XML document for well-formedness. The word processor monitors the XML document to determine if the XML document is well-formed and to automatically correct the XML document to maintain well-formedness.
1. A computer-readable medium encoded with computer-executable components, comprising:
a word processor configured to provide a freestyle-editing environment for editing an XML document comprising a first tag pair and a second tag pair, the freestyle-editing enviromnent enabling free editing of the XML document; and
an XML well-formedness monitor associated with the word processor, the XML well-formedness monitor being configured to:
determine if the XML document violates a tag-nesting rule, wherein the tag-nesting rule requires that the first tag pair is entirely contained within the second tag pair,
determine a priority established between the first tag pair and the second tag pair based on whether the tag pair is a normal XML tag pair or a native XML tag pair, and
automatically execute a correction rule to restore the well-formedness of the XML document when the XML document contains a tag-nesting rule violation, wherein the correction rule is executed by moving one tag in the tag pair that is associated with a higher priority such that the first tag pair is entirely contained within the second tag pair.
2. The computer-readable medium of claim 1 , wherein the XML well-formedness monitor is a component of the word processor.
3. The computer-readable medium of claim 1 , wherein the priority associated with normal XML tags is higher than the priority associated with native XML tags.
4. The computer-readable medium of claim 1 , wherein the priority associated with native XML tags is higher than the priority associated with normal XML tags.
5. A computer-implemented method for controlling the editing of an XML document comprising a first tag pair and a second tag pair, the method comprising:
determining whether the XML document contains tag-nesting rule violation, wherein the tag-nesting rule requires that the first tag pair is entirely contained within the second tag pair;
determining a priority established between the first tag pair and the second tag pair based on whether the tag pair is a normal XML tag pair or a native XML tag pair; and
automatically executing a correction rule when the XML document contains a tag-nesting rule violation, wherein the correction rule is executed by moving one tag in the tag pair that is associated with a higher priority such that the first tag pair is entirely contained within the second tag pair.
6. The computer-implemented method of claim 5 , wherein determining whether the XML document contains tag-nesting rule violation is performed in response to a triggering event.
7. The computer-implemented method of claim 6 , wherein the triggering event occurs in response to an edit of the XML document.
8. The computer-implemented method of claim 6 , wherein the triggering event is a timing related event.
9. The computer-implemented method of claim 6 , wherein the triggering event is configured to reduce interruption while the XML document is being edited.
10. The computer-readable medium of claim 5 , wherein the priority associated with normal XML tags is higher than the priority associated with native XML tags.
11. The computer-readable medium of claim 5 , wherein the priority associated with native XML tags is higher than the priority associated with normal XML tags.