Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Selcting filtered node set based on variable

From: "Bradford" <bradford_interland@-------.--->
To: NULL
Date: 12/1/2004 8:02:00 AM
Question for the masses...

Lets say I have variable with the following contents
"aaaa bbbb ccccc dddd".  The format is not specific and the space
delimiter could be changed to any other.

How would i count and/or select the nodes where a child nodes value is
not contained in this list.  Or the reverse scenario would be sufficent
whereas I count the nodes whose child nodes value is contained.

A contrived example of my situation follows...thanks for the help.

<root>
<limbs>
<branch>
<name>a</name>
<flower>big</flower>
</branch>
<branch>
<name>b</name>
<flower>big</flower>
</branch>
<branch>
<name>c</name>
<flower>large</flower>
</branch>
<branch>
<name>d</name>
<flower>giant</flower>
</branch>
</limbs>
<root>

<xsl:stylesheet	version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" omit-xml-declaration="yes"/>
<xsl:variable name="Exclude">
<xsl:value-of select="big large"/>
</xsl:variable>
<xsl:template match="/">
<xsl:variable name="DomainCount">
<xsl:value-of select="count(//branch[contains($Exclude,
flower)])"/>
      </xsl:variable>
	</xsl:template>
</xsl:stylesheet>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent