|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Peculiar variable assignment
> <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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








