cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrik Hofmann" <>
Subject RE: C2 Stylesheet, logicsheet and content
Date Wed, 26 Sep 2001 10:09:04 GMT

-----Original Message-----
From: [] On
Behalf Of Michael Bierenfeld
Sent: Mittwoch, 26. September 2001 11:49
To: Cocoon User Mailing List
Subject: C2 Stylesheet, logicsheet and content

Hi once again :-(

C2 is driving me nuts. I can run the xsp examples with no props. I can
evenso run own xsp files without a logicsheet. No Propblem at all. But
what I wanna do right now is the following :

content/greeting.xml                   -> content
logicsheets/logicsheet.greeting.xsl    -> logic
stylesheets/greeeing.xsl               -> style

I have the following entry in my mounted sitemap :

   <map:match pattern="content/greeting">
    <map:generate type="serverpages" src="content/greeting.xml"/>
    <map:transform src="stylesheets/greeting.xsl"/>

greeting.xml looks like this :

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?xml-logicsheet href="../logicsheets/logicsheet.greeting.xsl"?>




logicsheet.greeting.xsl looks like this :

<?xml version="1.0"?>

    <xsl:template match="xsp:page">
            <xsl:apply-templates select="@*"/>


            <xsl:apply-templates select="@*"/>


    <xsl:template match="@*|node()" priority="-1">

         <xsl:apply-templates select="@*|node()"/>



+ greeting.xsl as a simple style sheet

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl=""

    <xsl:template match="/">

                    <xsl:apply-templates/>hallo Michael Bierenfeld



Hi Michael,

The are some things I Think that don't seem to be right.

At First I don't know what your logicsheet is doing. In your content xml
you have the the elment <greeting:hello-world> (BTW you put it in
braces?). But this element matches nothing in your logicsheet.

Your logicsheet should contain something like this

<xsl:template match="greeting:hello-world">


The next point is you need to register your logicsheet in cocoon.xconf
You do this by adding something like this

          <parameter name="prefix" value="greeting"/>
          <parameter name="uri" value=" "/>
          <parameter name="href" value="resource://path to your
logisheet in jar. logicsheet.greeting.xsl    "/>

It's important to put your logicsheet intp a jar file containing the
right directory structure.


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