cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerritjan <gerritjankoekk...@mac.com>
Subject Unable to pass inputmodule value as parameter
Date Sun, 10 Oct 2004 19:33:37 GMT
Hello,

My sitemap looks like:
     <map:match pattern="cdls_artikelen.xml">
       <map:generate src="cocoon:/cdls_artikelen_lijst.xml"/>
       <map:transform src="style/xsl/artikel_lijst2artikel.xsl">
         <map:parameter name="p_datum" value="{date}"/>
       </map:transform>
       <map:serialize type="xml"/>
     </map:match>

My "style/xsl/artikel_lijst2artikel.xsl" looks like:
<xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:dir="http://apache.org/cocoon/directory/2.0">

   <xsl:param name="p_datum"/>

   <xsl:template match="dir:directory" >
     <basis>
     <onderwerpen datum_vandaag="{$p_datum}">
     <xsl:for-each select="dir:file">
        <xsl:variable 
name="xml_bestand">../../content/artikelen/<xsl:value-of 
select="@name"/></xsl:variable>
        <xsl:apply-templates 
select="document($xml_bestand)/child::onderwerpen/child::onderwerp">
          <xsl:with-param name="p_bestand"><xsl:value-of 
select="substring-before(@name,'.xml')"/></xsl:with-param>
        </xsl:apply-templates>
     </xsl:for-each>
     </onderwerpen>
     </basis>
   </xsl:template>

My output looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<basis xmlns:dir="http://apache.org/cocoon/directory/2.0">
   <onderwerpen datum_vandaag="">
     <onderwerp>...
    </onderwerp>
  </onderwerpen>
</basis>

The parameter value does not show up as the attribute value of 
attribute "datum_vandaag"
I tried to replace the {date} (in the sitemap!) with 
{system-property:substring-before(user.home, user.name)}
(used in the cocoon documentation!)
What am I missing?

Gerritjan Koekkoek
Mime
View raw message