cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Geraghty <rgerag...@lineone.net>
Subject baselink: module
Date Wed, 24 Dec 2003 12:49:26 GMT
Hello,

Has anyone been able to use the baselink: request module, I have tried 
the following and received an empty string when passing the parameter 
from the sitemap to xslt, see below:

----Sitemap fragment----
   
    <map:match pattern="test.xml">
            <!-- dont care what the base document is -->
            <map:generate type="request"/>
            <map:transform src="samples/test1/style.xsl">
                <map:parameter name="baselink" 
value="{baselink:.}-random-test-text"/>
                <map:parameter name="test" value="my-sitemap-test-value"/>
            </map:transform>
            <map:serialize type="xml"/>
    </map:match>

----Stylesheet ----

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:param name="baselink" select="string('base-not-defined')"/>
    <xsl:param name="test" select="string('test-not-defined')"/>

    <xsl:template match="/">
       <doc>
        <base>
            <xsl:value-of select="$baselink" />
        </base>
        <test>
            <xsl:value-of select="$test" />
        </test>
       </doc>
    </xsl:template>

</xsl:stylesheet>

---Result----

<doc>
    <base>-random-test-text</base>
    <test>my-sitemap-test-value</test>
</doc>

 From this I can see that the parameters are being passed to the stylesheet.

Any help getting this working would be greatly appreciated

--
Russell Geraghty

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message