You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Newland <cn...@nortelnetworks.com> on 2000/05/18 12:54:34 UTC
Using XSP parameters inside a template tag
Hi,
Is it possible to use a parameter you have defined in the xsp:logic section
of an xml page to pass a parameter to an xsl stylesheet template:
<page>
<xsp:logic>
String link="www.foo.com";
</xsp:logic>
<my_template url="{@link}"/>
</page>
Where: (in the XSL sheet)
<xsl:template match="my_template ">
<a href="{@url}">Click here</a>
<xsl:apply-templates/>
</xsl:template>
When I try this, the destination of the link is the literal {@link} so the
variable substitution I expected did not occur.
Can somebody tell me if this is possible and what I might be doing wrong?
Thanks,
--
Chris Newland
Software Research Engineer
Advanced IP Services and Management
Nortel Networks, London Road, Harlow, Essex, CM17 9NA.
Tel: +44(0)1279 405165
Fax: +44(0)1279 402047
Email: cnewland@nortelnetworks.com
"This message may contain information proprietary to Nortel Networks
so any unauthorised disclosure, copying or distribution of its
contents is strictly prohibited."
------------------------------------------------------------
Company name: Nortel Networks plc
Company number: 2515751
Company's registered office address: Maidenhead Office Park,
Westacott Way, Maidenhead, Berkshire SL6 3QH.
------------------------------------------------------------
Re: Using XSP parameters inside a template tag
Posted by Ulrich Mayring <ul...@denic.de>.
Chris Newland wrote:
>
> Hi,
>
> Is it possible to use a parameter you have defined in the xsp:logic section
> of an xml page to pass a parameter to an xsl stylesheet template:
>
> <page>
>
> <xsp:logic>
>
> String link="www.foo.com";
>
> </xsp:logic>
>
> <my_template url="{@link}"/>
If you want to reference the String link, you have to write
<xsp:expr>link</xsp:expr>
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung