|
Subject: RE: [xsl] resolving variables out of context? From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Tue, 11 Sep 2001 15:19:05 +0100 |
> <xsl:if test="@to">
> <xsl:variable name="toID" select="concat('B.', ../@src, '.',
> substring-before(substring-after(@to, 'ID('), ')'))"/>
> </xsl:if>
>
> Is the $toID limited to use *only* within the <xsl:if>?
yes.
> Is
> there any way to declare it so that it can be used anywhere
> within the <xsl:template match="//xptr"> as a whole?
>
Try:
<xsl:variable name="toID">
<xsl:if test="@to"><xsl:value-of select="concat('B.', ../@src, '.',
substring-before(substring-after(@to, 'ID('), ')'))"/>
</xsl:if>
</xsl:variable>
It's now a result tree fragment rather than a string, but you can use an RTF
to all intents and purposes as it it were a string.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] resolving variables out of co, James Cummings | Thread | [xsl] Xalan-Error., Auguste Oumar |
| RE: [xsl] using position() with XPa, Michael Kay | Date | [xsl] Xalan-Error., Auguste Oumar |
| Month |