RE: XPATH question - not FOP related
Try: xsl:for-each select="some_data" xsl:if test="position() 1" This is not the first! /xsl:if Repeating section... /xsl:for-each Scott -Original Message-From: Brian T. Wolf [mailto:[EMAIL PROTECTED]]Sent: Tuesday, January 22, 2002 1:30 PMTo: [EMAIL PROTECTED]Subject: XPATH question - not FOP related This is obviously off-topic, but since I have been subscribed to this list for a few months I know that you folks will be the most likely to answer this. I have been searching the various references, but I am not even sure what I should be looking for. Here is the situation: I am using xsl:for-each to loop through some data. For every pass after the first I want to insert another command. How do I test to see whether this is the first pass? example: xsl:for-each select="some_data" xsl:if test="is not the first" This is not the first! /xsl:if Repeating section... /xsl:for-each Thank you for your help. -Brian
Re: XPATH question - not FOP related
Hello Brian. This will help you: xsl:for-each select=some_data xsl:if test=position()[.'1'] This is not the first! /xsl:if Repeating section... /xsl:for-each OR xsl:for-each select=some_data xsl:if test=position() gt;'1' This is not the first! /xsl:if Repeating section... /xsl:for-each Bye Claus Nielsen Brian T. Wolf fop@BrianAndCh To: [EMAIL PROTECTED] risty.netcc: Subject: XPATH question - not FOP related 22-01-2002 19:29 Please respond to fop-dev This is obviously off-topic, but since I have been subscribed to this list for a few months I know that you folks will be the most likely to answer this. I have been searching the various references, but I am not even sure what I should be looking for. Here is the situation: I am using xsl:for-each to loop through some data. For every pass after the first I want to insert another command. How do I test to see whether this is the first pass? example: xsl:for-each select=some_data xsl:if test=is not the first This is not the first! /xsl:if Repeating section... /xsl:for-each Thank you for your help. -Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: XPATH question - not FOP related
That did it. Thanks! I knew I could rely on y'all. - Original Message - From: Scott Moore To: '[EMAIL PROTECTED]' Sent: Tuesday, January 22, 2002 10:25 AM Subject: RE: XPATH question - not FOP related Try: xsl:for-each select="some_data" xsl:if test="position() 1" This is not the first! /xsl:if Repeating section... /xsl:for-each Scott
Re: xpath
Maneshi Tuli [EMAIL PROTECTED] wrote: I want to count all rows for whom child col having attribute num='8' is not null [snip] Questions like this should be asked on the XSL list ([EMAIL PROTECTED]). Try count(row[col[not(@num='8')]]) This actually counts row elements with a col child which doesn't have a num attribete with the value 8. HTH J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]