cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Murphy <>
Subject Re: Simple XSL question
Date Tue, 05 Feb 2002 22:53:26 GMT
<xsl:import> and <xsl:include> are your friends when you start getting 
concerned about performance issues and want to do everything in one 
pass!  Of course though, if you generate one form of content, and then 
transform it to another form of content (say, xml->docbook->html) you 
are SOL. :(

>Just for the record, I went on using this template.
><xsl:template match="@* | node()">
>  <xsl:copy>
>    <xsl:apply-templates select="@* | node()"/>
>  </xsl:copy>
>I still wonder if it is not a bad design to generate a base xml at the
>begining of the pipeline, aggregate other generated xml data and then go
>into a number of transformations for each specific section of the base
>xml, transforming them with the other generated data, and copying all
>the unused data, in each transformation, for the rest of the pipeline,
>basically in terms of performance. By now, that's what I'm doing.
>-----Mensaje original-----
>De: Simone Gianni []
>Enviado el: lunes, 28 de enero de 2002 12:50
>Asunto: Re: Simple XSL question
>At 12.37 28/01/2002 -0300, you wrote:
>>How can I make a XSLT transformation of just a couple of elements,
>>leaving the rest untouched, without having to select everything and
>>passing it through?
>You can create a "catch all" template with lower priority, for example :
><xsl:template match="something">
>         <do>something</do>
><xsl:template match="*|node()" priority="-10">
>         <xsl:copy-of select="."/>
>This means that if "something" is found, it will be processed by the
>template, if "else" is found it will be processed by the second
>which does a copy. The lower priority is an optional, since the XSLT 
>processor should use the first template since it's more specific, but
>had some strange results, and forcing it is a good idea.
>I'm not sure about the <xsl:copy-of ..> ... it could cause some 
>duplications, you could try a <xsl:copy/> and see which one works better

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message