Re: XSL and the DOM

Subject: Re: XSL and the DOM
From: zun@xxxxxxxxxxxxxx
Date: Thu, 21 Oct 1999 15:51:26 -0400 (EWT)
Hi Jon, everyone,

On Thu, 21 Oct 1999, Jon Smirl wrote:

> I would like to be able to construct a DOM tree of my input document and
> then pass it into an XSL processor. I would also like to use XPath to query
> this tree as it is constructed. I checked several XSL processors and none
> seem to support this.  This is probably because of namespace and XPath
> issues.

I believe SAXON constructs DOM trees to do its processing.

As for XPath querying, I have a library which will do so which I'm calling
xpathdom.  Mail me if you're interested, it's in rough shape at the
moment.

> I then went and read the DOM2 spec which makes no mention of XPath. Why is
> this, shouldn't XPath be part of DOM2?

As previously posted to the list, DOM2 is missing some facilities which
would make XPath work.  This includes identifying ID attributes.  Also,
XPath has a different concept of the document object model than that of
DOM1/2.

> Right now all of the XSL processors are taking SAX events and building their
> own DOM trees with their own APIs.  Could this be split out in standard
> manner if the DOM supported namespaces and XPath?

It could if ever the DOM2 working group decides to support XPath.

> In my server-side app I currently build DOM1 trees and then convert them
> into SAX events to drive the XSL processors. There should be a better way.

Which XSL processor do you use?  Did you try SAXON?

. . . Sean.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • XSL and the DOM
    • Jon Smirl - Thu, 21 Oct 1999 15:12:53 -0400
      • zun - Thu, 21 Oct 1999 15:51:26 -0400 (EWT) <=
        • Jon Smirl - Thu, 21 Oct 1999 16:20:18 -0400
      • <Possible follow-ups>
      • Kay Michael - Fri, 22 Oct 1999 09:47:18 +0100
        • Jon Smirl - Fri, 22 Oct 1999 11:43:15 -0400