Re: Test message

Hello,

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
implementation?

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"
Phone=555-676767

D:\xmlSchema>
**

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.

Francis.

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