This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one 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.