[Home] [By Thread] [By Date] [Recent Entries]
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
|

Cart



