OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Xpath and DOM

[ Lists Home | Date Index | Thread Index ]
  • From: Ray Waldin <rwaldin@pacbell.net>
  • To: xml-dev <xml-dev@ic.ac.uk>
  • Date: Wed, 15 Dec 1999 02:10:05 -0800

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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS