[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Xpath and DOM

  • From: Ray Waldin <rwaldin@p...>
  • To: xml-dev <xml-dev@i...>
  • Date: Wed, 15 Dec 1999 02:10:05 -0800

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.