cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: Question on Transformer for Building OracleTransformer
Date Thu, 13 Jan 2000 23:54:09 GMT
Scott Boag/CAM/Lotus wrote:
> 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.  

Well, very first line of the Abstract...

"This specification defines the syntax and semantics of XSLT, which is a
language for transforming XML documents into other XML documents."

> 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.

True, XSLT can create something that is non-well-formed, so the
statement is indeed wrong. On the other hand, how can XSLT presume to
identify all the possible results of the XSLT transformations? in fact
(XML, HTML and TEXT) are not partitioning the result space since both
XML and HTML are TEXT.

Well, who am I to argue...
> > 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.

Sure, like most of the things that pollute a good idea: quick and dirty

What to know my opinion? <?xml-stylesheet?> should be an HTTP header and
<xsl:output> should not exist.
> The fact that xsl:output may be used to choose a formatter (this should
> really be done as a function of the namespace, IMHO)

That's right: it should _NOT_ be hardcoded internally as an element, but
rather the processor should "react" on something and use external
configurations to come up with the results. This to allow to output the
same document using "syntax-highlighted-pdf" instead of
"syntax-highlighted-html" or "xml".

>, 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.

Right, and this is exactly what we are going to do: ignore xsl:output.

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------

View raw message