[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] set union? xslt 2.0


Subject: Re: [xsl] set union? xslt 2.0
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 08 Apr 2010 11:55:51 +0200

Dave Pawson wrote:

<xsl:template match="skillarea[tokenize(@targets,'|')=tokenize($param,'|')]"/>

This is the 'odd' meaning of = in xslt 2?
If any item on LHS is present in RHS then = returns true.

It is not much different to '=' in XSLT/XPath 1.0 only instead of comparing node-sets it has been generalized to comparing sequences of items. But already with XPath 1.0 if you compare to node-sets e.g.
$foo = $bar
then the comparison is true if there is at least one node in $foo and in $bar for which the comparison is true.


Issue:
What happens with tokenize when the separator is missing?
empty set?

No, the first argument string is returned.


--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/


Current Thread
Keywords