[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Accessing specific repetitive node
Hi, I sort help on this previously and got a number of answers. The original question was, how do I access repeating nodes in an xml file outside of a for-each statement? I can get it to work but only for the first item in the repetitive block. The XML looks like this <DATA> <Table ID="2"> <Data> <Code>1</Code> <Code>2</Code> <Code>3</Code> <Code>4</Code> <Code>5</Code> </Data> </Table> </DATA> I need to access the first 1, 3 and 5 items. I have tried it in the following ways: <xsl:value-of select="DATA/Table[@ID='2']/Data/Code[1]" /> //this works okay <xsl:value-of select="DATA/Table[@ID='2']/Data/Code[position()=1]" /> //this also works okay But as soon as I try and access any item other than the first I get nothing in return. Has anyone got any ideas why? TIA Mark XSL-List info and archive XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|