xsl-list
[Top] [All Lists]

Re: Merging 2 XML's in to 1 output XML (Performance Issue)

2005-10-14 06:30:34
Michael Kay wrote:

It's actually very difficult to write a ContentHandler that's ready for
anything, and I don't think many people attempt it. For example, most people
assume that namespaces will be notified using the default settings -
unfortunately a ContentHandler with no handle on the parser has no way of
finding out what these settings are. JAXP says nothing about how an XSLT
processor should notify namespace information to a SAXResult, so what is one
to do? There are also new problems in this area, for example is it
legitimate to send XML 1.1 names and namespace undeclarations to a
ContentHandler that hasn't indicated it is prepared to cope with them?

I certainly know that TrAX is underspecified and poor as XML specifications go. This is what comes of specs developed behind closed doors rather than in open processes. There are numerous areas where the TrAX spec is open to interpretation or doesn't fully specify what should happen. But this isn't one of them.

The user supplied a syntactically correct stylesheet and a well-formed input document. The XSLT specification identifies the result tree that should be constructed from these inputs. The content of this result tree can be serialized to a SAXResult by invoking the appropriate methods in SAXResult. There's no justification for just throwing away parts of the tree.

There is one ambiguity. SAX/TrAX is not clear about whether startDocument/endDocument should be called in this case. However, either way you go I can work around it. I have no means to compensate when Saxon simply fails to report parts of the result tree.
--
Elliotte Rusty Harold  elharo(_at_)metalab(_dot_)unc(_dot_)edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--