xsl-list
[Top] [All Lists]

Re: [xsl] Testing if all child nodes match (based on the value of certain elements)

2007-04-23 14:02:07


I'm stuck with trying to figure something out in an XSL style sheet. I
can't post may actual data, as it's confidential, so I've made up an
example:

It's helpful if the posted input is well formed though.

I've been on this list for nine years or so I suppose (can't remember
exactly) and never yet seen a use for != but...


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="group">
  <xsl:value-of select="not(person/age!=person/age or person/sex!=person/sex)"/>
</xsl:template>

</xsl:stylesheet>

seems to do what you want.

David

--~------------------------------------------------------------------
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>
--~--