[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Universally quantified test of child attribute pr
Yves Forkl wrote:
Just a thought, based on what I think to grasp from what you want to do: <!-- holds a sequence to two numbers, one with @my.. one with all--> <xsl:variable name="mytest" select="count(*/@my_atrribute), count(*)" as="xs:integer+" /> <!-- choosing between the four possible scenarios. Note: order is important! --> <xsl:choose> <xsl:when test="$mytest[1] = $mytest[2]"> <!-- every child has @my_attribute --> </xsl:when> <xsl:when test="$mytest[1]"> <!-- some childs has @my_attribute --> </xsl:when> <xsl:when test="$mytest[2]"> <!-- no childs have @my_attribute --> </xsl:when> <xsl:otherwise> <!-- no childs at all --> </xsl:otherwise> <xsl:choose> As I said, just a thought, and perhaps way easier to write down and/or to understand. Like Larry Wall said: there's more than one way to do it. Cheers, -- Abel Braaksma http://www.nuntia.nl
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|