Browse Prior Art Database

Method to dynamicly resolve XML data from a relative location within an XML document

IP.com Disclosure Number: IPCOM000016212D
Original Publication Date: 2002-Nov-22
Included in the Prior Art Database: 2003-Jun-21
Document File: 2 page(s) / 55K

Publishing Venue

IBM

Abstract

Here is an easy way to extend your XML parser to resolve data that needs to be referenced in multiple locations in an XML document, without the need to create a separate XSLT. Today if the same data is needed in multiple locations within an XML document, you must duplicate the data or create an XSLT. By using the method described here, the data will only need to be stored once, referenced everywhere else, and can be resolved at runtime by the XML parser without the need for an additional XSLT document. This provides a lighter weight mechanism than a full transformation, and is useful for data that is primarily used for data storage or communication, and is not rendered into HTML. By creating a tag that incorporates XPATH (XML query language information, the needed data can be resolved by querying other parts from within the same document, or from other XML documents. For example: The tag listed above has data in an attribute (replaceableData) that needs to be resolved at the time the XML document is parsed. By creating a sequence of characters, in this case to enclose the inline xpath query the XML parser can be extended to perform the query and replace the query enclosed by the with the results of the query. For example, given the following XML document: 1

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 59% of the total text.

Page 1 of 2

  Method to dynamicly resolve XML data from a relative location within an XML document

    Here is an easy way to extend your XML parser to resolve data that needs to be referenced in multiple locations in an XML document, without the need to create a separate XSLT. Today if the same data is needed in multiple locations within an XML document, you must duplicate the data or create an XSLT. By using the method described here, the data will only need to be stored once, referenced everywhere else, and can be resolved at runtime by the XML parser without the need for an additional XSLT document. This provides a lighter weight mechanism than a full transformation, and is useful for data that is primarily used for data storage or communication, and is not rendered into HTML.

By creating a tag that incorporates XPATH (XML query language ) information, the needed data can be resolved by querying other parts from within the same document, or from other XML documents. For example: <target replaceableData="-[xpath:query statement]-" otherData="required"/> The tag listed above has data in an attribute (replaceableData) that needs to be resolved at the time the XML document is parsed. By creating a sequence of characters, in this case "-[ ]-" to enclose the inline xpath query the XML parser can be extended to perform the query and replace the query enclosed by the "-[ ]-" with the results of the query. For example, given the following XML document:

<?xml version="1.0" standalone="n...