RE: Using dom.Document as SAXON source
> 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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format