<xsl:attribute name="href">
doc-<xsl:value-of select="$filename" />.pdf
</xsl:attribute>
work correctly, the problem were that <xsl:param name="filename" /> were not
a child of the root element
see
http://www.nabble.com/retrieving-requested-filename-in-XSL-to24603200.html#a24604572
for the solution.
"DAVIGNON Andre - CETE NP/DIODé/PANDOC"-2 wrote:
>
> Hi,
>
> What about this in your XSL ?
>
> <xsl:attribute name="href">
> <xsl:value-of select="concat('doc-',$filename,'.pdf')" />
> </xsl:attribute>
>
> André
>
>
> Le 22/07/2009 11:51, > Jean-Bonneau (par Internet, dépôt
> users-return-97854-andre.davignon=developpement-durable.gouv...@cocoon.apache.org)
>
> a écrit :
>> Hello,
>>
>> I want to ouput the filename requested in the URL in an XSL stylesheet
>> (e.g.
>> get "toolz" from http://server/cocoon/page-toolz), but it doesn't work.
>>
>>
>> Here is the involved part of the sitemap:
>> ...
>> <map:match pattern="page-*">
>> <map:generate src="content/pages/{1}.xml"/>
>> <map:transform src="style/xsl/page2html.xsl">
>> <map:parameter name="filename" value="{1}" />
>> </map:transform>
>> <map:serialize type="xhtml" />
>> </map:match>
>> ...
>>
>>
>> Then, the xsl style/xsl/page2html.xsl markup:
>> ...
>>
>> <xsl:param name="filename" />
>> <xsl:attribute name="href">
>> doc-<xsl:value-of select="$filename" />.pdf
>> </xsl:attribute>
>> Version PDF
>>
>>
>>
>> But this always print doc-.pdf
>> I tried <xsl:variable name="filename" /> instead of <xsl:param
>> name="filename" />, but it doesn't work either.
>>
>> Can you help me gess why isn't the parameter working ?
>>
>>
>> Thanks.
>>
>>
>> Rodolphe GOHARD.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/retrieving-requested-filename-in-XSL-tp24603200p24604616.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]