XSLT Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pemadorje
    New Member
    • Jul 2006
    • 1

    XSLT Question

    Can anyone help me with a quick question? I am trying capture the first and last iteration of a repeating element. I am using the xsl:value-of select, how can I select only the first and last occurence?

    Many thanks,
    -d

    Code:
    <xsl:for-each select="details/po">
         <tr>
              <td><xsl:value-of select="po"/></td>
         </tr>
    </xsl:for-each>
    Last edited by Dormilich; Jan 22 '09, 09:27 AM. Reason: added [code] tags
  • DAnne
    New Member
    • Jun 2006
    • 5

    #2
    you can try
    Code:
    <xsl:value-of select="po = position()=[1]"/> 
    and 
     <xsl:value-of select="po=position()=last()"/>
    Last edited by Dormilich; Jan 22 '09, 09:28 AM. Reason: added [code] tags

    Comment

    Working...