You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by leona s <lr...@realtime.net> on 2003/01/01 19:26:39 UTC
Can I use map:aggregate for XSL files?
Hi All,
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.
Thanks very much,
Leona Slepetis
lrs@realtime.net
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Can I use map:aggregate for XSL files?
Posted by Joerg Pietschmann <j3...@yahoo.de>.
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
http://www.w3.org/TR/xslt#include
and
http://www.w3.org/TR/xslt#import
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:aggregate>
<map:transform src="strip-dummy.xsl"/>
<map:serialize name="xml"/>
</map:match>
</map:pipeline>
with the transformation in strip-dummy containing roughly
<xsl:template match="dummy">
<xsl:element name="stylesheet"
namespace="http://www.w3.org/1999/XSL/Transform">
<xsl:for-each select="xsl:stylesheet|xsl:transform">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:element>
</xsl:template>
If you want to make more thorough manipulations with the aggregated
XSL, look at xsl:namespace-alias.
J.Pietschmann
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Can I use map:aggregate for XSL files?
Posted by Joerg Pietschmann <j3...@yahoo.de>.
On Wednesday 01 January 2003 20:18, you wrote:
> Some time ago there was a caching problem. You must change the including
> XSL to get the changes of the included XSL files. But I don't know the
> current status.
This has been fixed in may, and the patch should have made it
already into C2.0.3 (didn't check this however). Last time I looked
the problem was still in the 2.1 branch, because the transformer
component was moved to Avalon and they had some other problems
at this time.
J.Pietschmann
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Can I use map:aggregate for XSL files?
Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Leona,
yes that's really a problem. You can only create an element, but no
attributes. But there is another mechanism to break down the huge XSL
files. Do you know <xsl:import/> and <xsl:include/>? Have a look at
http://www.w3.org/TR/xslt#section-Combining-Stylesheets.
Some time ago there was a caching problem. You must change the including
XSL to get the changes of the included XSL files. But I don't know the
current status.
Regards,
Joerg
leona s wrote:
> Hi All,
>
> 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.
>
> Thanks very much,
> Leona Slepetis
> lrs@realtime.net
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Can I use map:aggregate for XSL files?
Posted by Cocoon User <co...@eng.gr>.
we have a system that produce web site drived form a xslt collection
we have a core.xsl file and include into this all others usinc
<xsl:include> using relative to core.xsl paths
thats work fine and completly transparent to cocoon. so we can use
this xslt collection with or without cocoon
regard
Stavros Kounis
http://www.osmosis.gr
On Wed, 1 Jan 2003, leona s wrote:
> Hi All,
>
> 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.
>
> Thanks very much,
> Leona Slepetis
> lrs@realtime.net
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>