xsl-list
[Top] [All Lists]

Re: [xsl] Problem with "except" operator

2009-02-11 09:31:52
G. Ken Holman wrote:

<xsl:template match="/">
<xsl:variable name="users" select="//Users/User/UserId" />
<xsl:variable name="friends" select="//Friends/Friend/UserId" />

<!-- debug output -->
<xsl:value-of select="$users [. != $friends]" />

For the (short) example data posted it does not matter but in general I think the above should be
  <xsl:value-of select="$users[not(. = $friends)]"/>
as that is quite different from $users[. != $friends].



--

        Martin Honnen
        http://JavaScript.FAQTs.com/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--