cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Pietschmann <>
Subject Re: Can I use map:aggregate for XSL files?
Date Wed, 01 Jan 2003 19:35:25 GMT
On Wednesday 01 January 2003 19:26, you wrote:
> I have a rather large application that has a huge XSL file that I would
> like to break down into smaller files. Is it possible to use aggregate
> to do this? The problem is establishing the attributes of the
> xsl:stylesheet element in the root; I don't see a way to do this
> with map:aggregate.

You should try xsl:include and xsl:import first. See
If you really want aggregate style sheets, you'll have to use an
internal pipeline and a cocoon: redirection, something like
  <map:pipeline internal="yes">
    <map:match pattern="foobar.xsl"
      <map:aggregate element="dummy">
        <map:part src="file:///foo.xsl"/>
        <map:part src="file:///bar.xsl"/>
      <map:transform src="strip-dummy.xsl"/>
      <map:serialize name="xml"/>
with the transformation in strip-dummy containing roughly
 <xsl:template match="dummy">
   <xsl:element name="stylesheet"
     <xsl:for-each select="xsl:stylesheet|xsl:transform">
       <xsl:copy-of select="."/>
If you want to make more thorough manipulations with the aggregated
XSL, look at xsl:namespace-alias.


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