Re: Counting Child Nodes?
Yes. Re-read the comments of Scott and Michael. You haven't (yet) applied their advice. Comparing numbers as strings (MK & Scott), using xsl:if when xsl:when is better and vv (Scott & MK), being overly verbose (Scott & MK), a possible full solution (Scott) and questions about the code in general (MK) were all points of attention not reflected in this new post of you. Maybe you missed their messages? Check back what they wrote (19-10-2007 17:01 and 17:02 resp). If things are not clear, ask them to clarify.
Some of the points mentioned are well-explained in "Beginning XSLT" by Tennison. which you mention in your sample xml: if you don't have it yet, I recommend buying it, it is a good read and may very well teach you how to write XSLT declarative instead of imperative (which it is now), making your code more adapt to changes and less error prone.
Cheers, -- Abel Braaksma
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