RE: Using dom.Document as SAXON source

Subject: RE: Using dom.Document as SAXON source
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 20 Dec 1999 13:04:18 -0000
> Is it possible to apply SAXON to DOM documents using the public
> API? I had a look through the Stylesheet and Controller source,
> and it looks like SAXON builds something resembling a DOM before
> applying templates, but it uses a class (DocumentImpl) which
> doesn't explicitly implement any org.w3c.dom interfaces.

No, this is not currently possible. At one stage Saxon did work with
third-party DOM implementations, but that proved too cumbersome because the
limitations of the DOM API. Someone else has been experimenting with the
alternative approach, of making Saxon's tree implementation DOM-compliant,
but I haven't heard from them recently. Some of the obstacles are
frustratingly silly, e.g. if the tree is going to support DOM interfaces
then it has to support a lot of update functionality that Saxon doesn't
need, it also has to contain information that Saxon doesn't need e.g. about
entities and CDATA, and it has to represent namespace declarations as
attributes. Basically there are a lot of minor but important differences
between the DOM model and the XML infoset used by XSLT.

Mike Kay


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


Current Thread