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

Subject: Re: [xsl] Testing if all child nodes match (based on the value of certain elements)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 23 Apr 2007 22:01:45 +0100
> 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

Current Thread