Claims
- 1. A method of editing elements of a first document based on elements of a second document, said elements of said first document having a template structure, each said template comprising at least one match condition, said match condition being an expression in said template that describes a subset of nodes that are matched in a tree structure, said second document containing a tree structure to which said matching is applicable, said method comprising:
comparing a first selected fragment of an element from said second document with a second selected fragment of an element from said second document to determine if a match condition exists that describes the relation between templates in said first document, said match condition matching said first selected fragment and said second selected fragment; and permitting at least one of a plurality of predefined editing operations on said first document if said match condition exists.
- 2. The method of claim 1, wherein said plurality of predefined editing operations comprises at least one of copy, cut, and paste operations.
- 3. The method of claim 1, further comprising:
storing in a buffer a first user selection to be said first selected fragment and a second user selection to be said second selected fragment.
- 4. The method of claim 1, further comprising:
receiving a user input to select and execute a selected one of said predefined editing operations.
- 5. The method of claim 1, wherein said tree structure comprises eXtensible Mark-up Language (XML) and said first document comprises an eXtensible Style Language Transformations (XSLT) stylesheet comprising a tree structure of XML transformation rules.
- 6. The method of claim 5, wherein said second document comprises one of an XML source document and an XML result document.
- 7. The method of claim 6, wherein said first selected fragment and said second selected fragment each comprises at least one XML node.
- 8. A computer having an editor for editing elements of a first document based on elements of a second document, said elements of said first document having a template structure, each said template comprising at least one match condition, said match condition being an expression in said template that describes a subset of nodes that are matched in a tree structure, said second document containing a tree structure to which said matching is applicable, said editor comprising:
an input module for receiving a first selected fragment and a second selected fragment from said second document; a comparator for comparing a first selected fragment of an element from said second document with a second selected fragment of an element from said second document to determine if a match condition exists that describes the relation between templates in said first document, said match condition matching said first selected fragment and said second selected fragment; and an enabling module permitting at least one of a plurality of predefined editing operations on said first document if said match condition exists.
- 9. The computer of claim 8, wherein said plurality of predefined editing operations comprises at least one of copy, cut, and paste operations.
- 10. The computer of claim 8, said computer further comprising:
a buffer for storing a first user selection to be said first selected fragment and a second user selection to be said second selected fragment.
- 11. The computer of claim 8, wherein said input module further receives a user input to select and execute a selected one of said predefined editing operations.
- 12. The computer of claim 8, wherein said tree structure comprises eXtensible Mark-up Language (XML) and said first document comprises an eXtensible Style Language Transformations (XSLT) stylesheet comprising a tree structure of XML transformation rules.
- 13. The computer of claim 12, wherein said second document comprises one of an XML source document and an XML result document.
- 14. The computer of claim 13, wherein said first selected fragment and said second selected fragment each comprises at least one XML node.
- 15. A signal-bearing medium tangibly embodying a program of machine-readable instructions executable by a digital processing apparatus to perform a method of editing elements of a first document based on elements of a second document, said elements of said first document having a template structure, each said template comprising at least one match condition, said match condition being an expression in said template that describes a subset of nodes that are matched in a tree structure, said second document containing a tree structure to which said matching is applicable, said method comprising:
comparing a first selected fragment of an element from said second document with a second selected fragment of an element from said second document to determine if a match condition exists that describes the relation between templates in said first document, said match condition matching said first selected fragment and said second selected fragment; and permitting at least one of a plurality of predefined editing operations on said first document if said match condition exists.
- 16. The signal-bearing medium of claim 15, wherein said plurality of predefined editing operations comprises at least one of copy, cut, and paste operations.
- 17. The signal-bearing medium of claim 15, said method further comprising:
storing in a buffer a first user selection to be said first selected fragment and a second user selection to be said second selected fragment.
- 18. The signal-bearing medium of claim 15, said method further comprising:
receiving a user input to select and execute a selected one of said predefined editing operations.
- 19. The signal-bearing medium of claim 15, wherein said tree structure comprises eXtensible Mark-up Language (XML) and said first document comprises an eXtensible Style Language Transformations (XSLT) stylesheet comprising a tree structure of XML transformation rules.
- 20. The signal-bearing medium of claim 19, wherein said first selected fragment and said second selected fragment each comprises at least one XML node.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] The present Application is related to the following co-pending applications:
[0002] U.S. patent application Ser. No. 09/______,______, filed on ______, to Adler et al., entitled “METHOD AND SYSTEM FOR STYLESHEET-CENTRIC EDITING”, having IBM Docket YOR920010685;
[0003] U.S. patent application Ser. No. 09/______,______, filed on ______, to Adler et al., entitled “METHOD AND SYSTEM FOR STYLESHEET RULE CREATION, COMBINATION, AND REMOVAL TECHNOLOGY”, having IBM Docket YOR920010609; and
[0004] U.S. patent application No. 09/______,______, filed on _______, to Clarke et al., entitled “METHOD AND SYSTEM STYLESHEET EXECUTION INTERACTIVE FEEDBACK”, having IBM Docket YOR920010569, all assigned to the present assignee, and all incorporated herein by reference.