cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: XSLSerializer, XSLGenerator, XSLReader
Date Mon, 20 Jun 2005 19:40:23 GMT
BURGHARD √Čric wrote:

>By looking at the XMLSerializer source code, i just realized that the
>serialization was driven in fact by an xsl transformation (with no
>stylesheet). So i wondered, why not giving this serialization a real
>stylesheet ? That way i could overcome all the limitations of the actual
>I quickly hack the file, and end up with the XSLSerializer.
>The main advantages are
>- i can get rid of namespaces without another step
>- generate real xhtml (dispite the name the actual xhtml transformer
>contract all empty tags like textarea, div, script, ..., which makes all
>browsers really mad)
>- use directly all xslt2.0 serialization enhancements (character-maps) with
>- perhaps performance improvement, because the stylesheet is precompiled and
>reused with the component, and because we save one step in the pipeline
>(even if a plain serialization should be really fast). The stylesheet is
>XSL precompiled, whereas with conventional pipeline and cache activated,
>only its structure is precompiled (SAX).

- handle the <?xml-stylesheet?> processing instruction by serializing 
straight XML for those browsers that do support it, and process on the 
server for others.

>For now, i configure the serializer with a
>and use it with no parameters, but why not a
><map:serializer type="xslt" src="path_of_the_stylesheet">
>  <map:parameter name="cpath" value={contextpath:}


>to absolutise path, delete namespaces, change &and; to & (for javascript
>snippets), and serialize to xhtml (method=xhtml) all in one step ?
>By extension, why not having an XSLGenerator and an XSLReader ?

Hmm... you're starting to build pipelines-in-one-component. This doesn't 
seem to have the same kind of benefits than the serializer.


Sylvain Wallez                        Anyware Technologies  
Apache Software Foundation Member     Research & Technology Director

View raw message