De : Torsten Erler [mailto:[EMAIL PROTECTED] > I know it's not the right List, but I think there are a lot of XSL-Experts here in this list.
You might want to try the xsl-list at http://www.mulberrytech.com/xsl/xsl-list > Does anyone know the XPath expression for counting all Attributes and all childs (grandchilds...) > of all preceding siblings of the selected node??? count(preceding-sibling::*/@* | preceding-sibling::*/*) > In Other words which row number has the selected node in a full expanded tree. > (I need this to set the row backgound color for each second row) I don't understand the relationship between question 1 and question 2... For the second question, you just need something like this... <xsl:apply-templates select="row"/> <xsl:template match="row"> <xsl:choose> <xsl:when test="position() % 2 = 0"> <!-- Even row --> </xsl:when> <xsl:otherwise> <!-- odd row --> </xsl:otherwise> </xsl:choose> </xsl:template> You should use the context nodeset to do the hard work for you - otherwise you're going to enormously beef up your processing time. By the way, please excuse the mail formatting if it's yucky - I haven't quite figured out how to make Outlook behave properly. Cheers, Dave. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
