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

Trouble getting the self node attributes within for-ea

Subject: Trouble getting the self node attributes within for-each loop
From: "Chaudhary, Harsh" <HCHAUDHA@xxxxxxxxx>
Date: Thu, 6 Dec 2007 18:30:52 -0600
 Trouble getting the self node attributes within for-ea
Hi,

I have an XSLT transform in which I am doing a for-each loop.

The XML sample could be:

<territory>
    <zipcode @zip="11111">
        <name>Something</name>
    </zipcode>
    <zipcode @zip="22222">
        <name>Something</name>
    </zipcode>
    <zipcode @zip="33333">
        <name>Something</name>
    </zipcode>
</territory>

I run a for-each look over //zipcode, do some operations and store the
results of the for-each into a variable (result tree fragment).

I then pass this variable to another section of my code. I can get the
value of "name" correctly as it is an element.

My question is, is there a way to also get the value of the
corresponding @zip?

If some sample XSLT would be useful, I can code something up quickly in
case someone needs to see how I am doing things.

Thanks,
HC.

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.