cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hewko, Doug" <Doug.He...@ccra-adrc.gc.ca>
Subject Unable to pass a parameter
Date Tue, 02 Oct 2001 14:25:31 GMT
Can someone please help me pass a parameter to a XSL stylesheet?

I have been trying without luck and do not know why this will not work with
Cocoon2. I've been told it should be possible, but no luck and I can't find
anything in the archives to help me. I know that this is a Cocoon2 problem
because others have validated that the XSL is correct with non-Cocoon
processors.

In my examples below, I was hoping that clicking on the "click here" text
would change the value of my parameter. But no luck. If I add
"?paramtest=something" after my URL, I also get no parameter passed. 

Here's my XML:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="test.xsl" type="text/xsl"?>
<resource>
xml file value
</resource>
****************************************************************************
****
Here's my XSL:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- determine output of transform -->
<xsl:output method="html" encoding="iso-8859-1" indent="yes"/>

<xsl:param name="paramtest" select="'on'"/>
<!-- master template-->
<xsl:template match="/">
<html>
<body>
parameter value=<xsl:value-of select="$paramtest"/>
<br /><br />
xml value=<xsl:value-of select="//resource"/>
<br /><br />
<a>
<xsl:attribute name="href">test.html?paramtest=12</xsl:attribute>
Click here</a>
</body>
</html>

</xsl:template>

</xsl:stylesheet>

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message