[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:
Your second test can be simplified if you make the third test to be your second: <xsl:when test="*[@my_attribute]"> which will leave your <xsl:otherwise /> to catch what's now in "every $child in ... not(@my..." (you can remove that altogether). Of course, it is a matter of taste. I dislike the 'every' and 'some' expressions, because they tend to be very confusing, even on second read, and especially when used with negation: <xsl:choose> <xsl:when test="* and (every $child in * satisfies $child[@my_attribute])"> <!-- all children have @my_attribute --> </xsl:when> <xsl:when test="*[@my_attribute]"> <!-- some children have @my_attribute --> </xsl:when> <xsl:otherwise> <!-- zero children, or none have @my_attribute --> </xsl:otherwise> <xsl:choose>
|
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
|