This isn't the list for those kind of questions I think, but since it's an easy one and I'm new...
The position() function returns the position within the current node set being operated on. When you select just column, you get the result you expected. When you use <xsl:apply-templates/> with no select, you are processing every node set in the document in order. This is exactly as it was intended and has its own uses. You can get the position of just the columns using more complicated XPath and predicates, but you'll have to go to the right lists for that. Try http://www.mulberrytech.com/xsl/ -- it's mentioned at the cocoon lists page. Geoff Howard -----Original Message----- From: Spectron International, Inc. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 1:31 PM To: [EMAIL PROTECTED] Subject: xsl:apply-templates bug? I have noticed something with xsl:apply-templates I don't know if it is a bug but it seems to me that it shouldn't work that way. I have the following xml: <header> <column> <column> <column> <column> </header> And the following templates: <xsl:template match="column"> <xsl:value-of select="position()"/> </xsl> If I use <xsl:apply-templates select="column"/> it will return the expected numbers (1,2,3,4) if I only use <xsl:apply-templates/> it returns (2,3,4,5). Why is that? Fawzib Rojas --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>