B
Bradford
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">
<xslutput 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>
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">
<xslutput 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>