[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Xpath and DOM
I believe there are a few gotchas with any XPath/XSLT to "pure" DOM L1 mapping, no matter what language or implementaion. Here are a few I've run into: 1) DOM L1 lacks "real" support for namspace to prefix mapping so you have to know the exact prefixes used in the documents you process, whereas with XPath via XSLT namespace prefixes are automagically mapped for you. 2) no support for the XPath namespace axis so you cannot query or select based on namespace 3) no support for the XSLT document() function. This would be a useful DOM extension to XPath, but DOM L1 (or L2 for that matter) has no mechanism for opening a document. 4) DOM does not support ID/IDREFs as it has no concept of attribute types (this is a function of the parser, not the DOM) which means there's no way to map the XPath id() function to a pure DOM implementation. Another WIBN! The Sun parser (ProjectX TR2) has an extension function which supports ID/IDREFs (XmlDocument.getElementsById() I think), but even this support is limited to elements which are parsed as opposed to elements which you construct using the DOM Document.createElement() API. Anyone know of any others? -Ray xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|