[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 11:02:53 -0600
Re:  Reading Attributes in XSL
On 11/15/05, pankaj.ahuja@xxxxxxxxxxxx <pankaj.ahuja@xxxxxxxxxxxx> 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

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.