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

Re: Reading Attributes in XSL

Subject: Re: Reading Attributes in XSL
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Tue, 15 Nov 2005 10:34:47 -0600
Re:  Reading Attributes in XSL
On 11/15/05, pankaj.ahuja@xxxxxxxxxxxx <pankaj.ahuja@xxxxxxxxxxxx> wrote:
> Hi:
>
> I am trying to read attributes of current node such that I read the first
> Attribute and then read all attributes of child elements (as many child
> elements there are) and then back to reading the second attribute of the
> parent node.

Considering attributes are unordered in XML this could be risky.  Most
XML parsers I believe will return them in document order but not
necessarily all.  A better way might be to take the name of the
attribute and match on that.

Also, do you really mean children or descendants?  If just children
you can get away with a for-each loop, otherwise you'll either need
some sort of grouping approach or recursive templates.


Jon Gorman

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.