[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Is it OK for xsl:output to affect the construction

Subject: Re: Is it OK for xsl:output to affect the construction of an unserialized result tree?
From: david_n_bertoni@xxxxxxxxxx
Date: Tue, 20 Jul 2004 09:11:27 -0700
override xsl output
> Suppose we transform a DOM Document, XOM document, SAX InputSource or
> some other such representation of an XML document. Furthermore
> suppose that instead of serializing the output as a stream or a
> string we create another DOM document, XOM document, etc. Should the
> xsl:output element have any effect?

You are already talking about things which are outside the scope of the
XSLT 1.0 recommendation, so I don't see how you can apply it.

> My claim is that it should not. Anything said in the xsl:output
> element applies only when the document is serialized to a an actual
> XML document represented as a sequence of characters or bytes, not
> before. This is what earlier versions of Xalan did. Faced with this
> case,  they would produce a result tree containing six child nodes of
> different kinds, element, comment, and processing instructions.

Yes, but the XSLT 1.0 recommendation does not provide any access to the
result tree, nor does it allow access to the structure of a result tree
fragment, so how can you even know what the result tree looks like without
using processor-specific extensions, or APIs?  In fact, there is nothing in
the XSLT 1.0 recommendation that requires that a processor actually create
the result tree, and Xalan-J does not.

On the other hand, I do think it's problematic (and a bit of a stretch),
not to represent the result tree properly in this case, since it makes
stylesheets less flexible, and breaks backward-compatibility.  Perhaps if
you override the output method through TrAX, you can work around the
problem?

Dave

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.