This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
We are trying to enforce a couple of business constrainrs with XPATH . A sample xml node is as follows: ..... ..... <event> <element>IE</element> <elementtype>browser</elementtype> <eventtype>Navigate</eventtype> <value>http://www.....com/</value> </event> ....... .......
If we need to ensure that the XML has ATLEAST one 'element' node containing text as "IE" we do: <xsl:template match="element[count(IE) < 1]" > <xsl:text>ERROR: Atleast one IE element needed</xsl:text> </xsl:template>
But we need to ensure that ATLEAST one of the IE 'event' nodes has a combination of 'element' as IE and 'value' node containing the text "Logout" i.e.