W3C home > Mailing lists > Public > www-dom-xpath@w3.org > May 2000

Re: Test message

From: Francis Norton <francis@redrice.com>
Date: Mon, 01 May 2000 08:38:14 +0100
Message-ID: <390D3466.42A73A60@redrice.com>
To: dave.pawson@virgin.net
CC: www-dom-xpath@w3.org

Dave Pawson wrote:
> My Interest in this group:
> I have a customer requirement for
> xpath type navigation with an xml
> document as one view; 'tother is audio.

My interest - writing B2B and general IT components using XML and
XML-Schema to glue them together in an open and discoverable way.

Perhaps we could establish some use cases for an in-DOM XPath

I thought the article on RAX
(http://www.xml.com/pub/2000/04/26/rax/index.html) made a good point -
not so much the memory requirement, which doesn't apply to my
glue/parameter usage, but the complexity of writing simple business
functions in raw DOM.

I've adapted the test data, and writen some DOM level 1 code in MS
JScript to do a simple query. The results were quite interesting.

Here's how the query works in Windows:

D:\xmlSchema>tableDOM table.xml "Francis Norton"


The first thing to note is that the query part of the program takes 15
lines of code in tableDOM.js, versus 3 lines using a hypothetical
queryNodes() function in tableXpath.js.

The second thing is that even with the 15 lines of code, the existing
DOM code is rather less robust, and might require  expansion to cope
with optional Name or Path nodes, though to be fair you would probably
start to write some kind of library to cope with these uses. Which would
of course amount to re-inventing a small part of the xPath wheel.


Received on Monday, 1 May 2000 03:41:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:43:07 UTC