|
Subject: RE: Peculiar variable assignment From: Kay Michael <Michael.Kay@xxxxxxx> Date: Wed, 24 May 2000 14:42:09 +0100 |
> <xsl:variable name="bbString" select="BESTBEFORE" />
> <xsl:variable name="bbMonth"
> select="document('')//foo:month[@name =
> substring-before(substring-after($bbString, ' '), ' ')]/@num" />
>
> gives $bbMonth = "05" whereas:
>
> <xsl:variable name="bbMonth"
> select="document('')//foo:month[@name =
> substring-before(substring-after(BESTBEFORE, ' '), ' ')]/@num" />
>
> gives $bbMonth = "", as does:
In the second example BESTBEFORE is used in a predicate, so the system
expects it to be a child of the foo:month element you are examining. If you
don't want to use a variable you could write current()/BESTBEFORE
Mike K
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Peculiar variable assignment, Jeni Tennison | Thread | Number of node in list from stylesh, Jeni Tennison |
| Re: Read ,Compare the value and do , Cheun N Chong | Date | RE: Number of node in list from sty, Kay Michael |
| Month |