[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Accessing specific repetitive node

Subject: Accessing specific repetitive node
From: "Mark Williams" <mark@xxxxxxxxxxx>
Date: Fri, 5 Mar 2004 11:47:12 -0000
accessing specific nodes
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.