[Top] [All Lists]

Re: Reading Attributes in XSL

2005-11-15 09:34:47
On 11/15/05, pankaj(_dot_)ahuja(_at_)jpmchase(_dot_)com 
<pankaj(_dot_)ahuja(_at_)jpmchase(_dot_)com> wrote:

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

XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>