cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BURGHARD √Čric <>
Subject Re: Suggestion for XHTMLSerializer
Date Sat, 06 Aug 2005 09:03:22 GMT
> What XMLSerializer are you talking about? The one in the serializers
> block or the default one?


>> I wrote a much more powerfull solution: the XSLSerializer, which let you
>> control the serialization through an xsl stylesheet (an so use the
>> xsl:output tag as well as some template rules to make final cleanup like
>> namespace deletion or href contextualization). I need to do some cleanup,
>> and i will submit a patch.
> This is definitely the wrong approach and will probably be not accepted
> for the official Cocoon codebase. The transformer influencing the
> pipeline is like a component controlling the component container.
> Additionally it makes no sense letting an intermediate transformer set
> the serialization method for the end of the pipeline. What about an
> I18nTransfomer after your stylesheet? Your approach also reduces the
> reusability of the stylesheet as it is tied to a specific output format.

In fact, you must check the source code, this the actual approach with the
XMLSerializer. The serialization is done with the xsltprocessor but with an
empty stylesheet. The serialization is controlled with the output
parameters which are taken from the sitemap configuration blocks (tag names
are in fact attributes names of xsl:output). So, if you look closer, the
XSLSerializer is in fact an obvious evolution of the actual XMLSerializer:
1. what are the reason of enforcing the serialization method to 'xml'
whereas xsltprocessor can do much more (no need to rewrite code in
specialized serializer (XHTML serializer), it's already done),
2. why just giving an empty stylesheets to the processor instead of a more
sophisticated one which could help for example to get rid of alien

And obviously, i'm talking about final transformation/serialization. If want
to localise my templates, i could write some templates and use efficently
the xsl:index to implement i18n:text and others in the final
transformation, but i'm using the i18n transformer BEFORE serialization.


View raw message