|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Variable in XPath
Garvin Riensche wrote:
Hi Abel, In addition, if you want an extensible solution, you can consider this as parameter value: id=2;owner=4;name=john in which case you do not have to create a new parameter each time you add a new query possibility to your template. You match would then look as follows: <xsl:variable name="attributes" select="tokenize($query, ';')" /> <xsl:variable name="attr-names" select="for $i in $attributes return tokenize($i, '=')[1]" /> <xsl:variable name="attr-values" select="for $i in $attributes return tokenize($i, '=')[2]" />
... do your thing with the matches ... </xsl:template> Come to think of it, this is probably a shorter solution in the long run ;) Happy coding! -- Abel Braaksma
|
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
|






