You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Enric Staromiejski <co...@nxtsis.com> on 2001/11/15 18:49:30 UTC
RE: Stylesheets using Logicsheets
Hi everybody,
We see a lot of you are working with logicsheet. We alse are itching for a
go, but are not succeeding at all. It's true we're newbies in the Cocoon
world, but are resolving a lot of things and hope to be able using
logicsheet soon. The problem is that we can't find any example at all of:
1. how to modifiy the cocoon.xconf file in order to insert our own built-in
logicsheet
2. a complete working example of an xml, its xsl-logicsheet and xsl
stylesheet file
If any of you could inform us about where to get information or
documentation on how to do this, please help us.
thank you
RE: Stylesheets using Logicsheets
Posted by David Rosenstrauch <da...@dti.net>.
At 06:49 PM 11/15/01 +0100, you wrote:
>Hi everybody,
>
>
>We see a lot of you are working with logicsheet. We alse are itching for a go, but are not succeeding at all. It's true we're newbies in the Cocoon world, but are resolving a lot of things and hope to be able using logicsheet soon. The problem is that we can't find any example at all of:
>
>1. how to modifiy the cocoon.xconf file in order to insert our own built-in logicsheet
No need to modify cocoon.xconf
What I usually do is apply a logic sheet at compile time (e.g., using Ant to call Xalan).
So I take index.xml, transform it using logicsheet.xsl, and produce index.xsp
Then I execute it at run time with the following.
<map:match pattern="index.html">
<map:generate type="serverpages" src="index.xsp"/>
<map:transform src="style.xsl"/>
<map:serialize/>
</map:match>
>2. a complete working example of an xml, its xsl-logicsheet and xsl stylesheet file
XML:
<?xml version="1.0"?>
<root/>
logicsheet:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="root">
<xsp:logic>
boolean condition = true;
if (condition) {
<root1/>
}
else {
<root2/>
}
</xsp:logic>
</xsl:template>
</xsl:stylesheet>
I think that should give you some idea. Email if you need more info.
DR
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>