cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject Re: Question on Transformer for Building OracleTransformer
Date Thu, 13 Jan 2000 15:26:38 GMT

Stefano Mazzocchi wrote:
> The very first line of the spec says that XSLT is a file to transform
> XML documents into XML documents.

Where?  I don't see that in my copy of the XSLT recommendation.  XSLT is
expressed as an XML stylesheet, takes as input a source tree, and outputs a
result tree, both of which fit the XSLT/XPath Data Model.  Both the source
tree and the result tree should normally be able to be expressed as XML,
though this is not a requirement for processors.  If it says somewhere what
you said, it is a bug in the text and should be fixed.

> Well, <xsl:output> breaks this.

xsl:output is a *hint* to the serializer.  From section 16: "An XSLT
processor may output the result tree as a sequence of bytes, although it is
not required to be able to do so (see [17 Conformance]). The xsl:output
element allows stylesheet authors to specify how they wish the result tree
to be output. If an XSLT processor outputs the result tree, it should do so
as specified by the xsl:output element; however, it is not required to do
so."

> Anyway, if you really think about it, <xsl:output> is the equivalent of
> <?xml-stylesheet?>. An hard link between two different contexts.

Yes, but both of these are hints.  Not pure and clean, but useful for what
needs to be done.

The fact that xsl:output may be used to choose a formatter (this should
really be done as a function of the namespace, IMHO), or to specify
something like "syntax-highlighted-on-pdf" (this should be done via the
semantics of the formatting vocabulary used, perhaps in conjunction with
parameters passed to the formatting functions), is probably a bit of abuse
for what it was intended.  It was really intended to specify serialization
of the result tree to a sequence of bytes, though I'm not sure the abuse
hurts anything, since the processor is free to ignore.

-scott








Mime
View raw message