xsl-list
[Top] [All Lists]

Re: Reading Attributes in XSL

2005-11-15 10:02:53
On 11/15/05, pankaj(_dot_)ahuja(_at_)jpmchase(_dot_)com 
<pankaj(_dot_)ahuja(_at_)jpmchase(_dot_)com> wrote:

This will tell you exactly what I am trying to do:

You are optimistic.  To tell the honest truth, I saw this email
earlier and it's confusing , long, and could have been simplified.  I
didn't really pay close attention.  Now it's been sent to the list for
the fourth time.  I see nowhere a duplicated attribute or anything
that resembles the problem you stated to start this thread.

Your other posting has some issues, but the only thing relating to
attributes that I can see just is a simple series of for-each loops
(ok, templates would be better).
ie

<xsl:for-each select="@*">
<xsl:value-of select="." /><xsl:text>&#10;</xsl:text>
</xsl:for-each>
<xsl:for-each select="*/@*">
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>


The problem in your original post for this thread describes this situation:

<parent foo="lark" bar="time">
<child foo="1" bar="9" />
<child foo="3" bar="2" />
<child foo="8" bar="0" />
<child foo="1" bar="1" />
</parent>

And you want to get the value of the 1st attribute of the values of
the first attribute of the children.   David Carlisle's example should
do the trick.

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>