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

Attribute values and Ancestors

Subject: Attribute values and Ancestors
From: "Dan Walker" <dew@xxxxxxxxxxxx>
Date: Tue, 15 Dec 1998 17:57:45 -0500
dan walker
Hi all,

I'm rather new to XSL, but have a quick question.  When I am in a nested
<xsl:for-each ...> block, I can get the value of an inner attribute by
doing:

	{attribute(id)}

But, how do I get the value of an outer attribute?

In the following example, I am trying to build an HTML input field.  I want
to assign the value of the id attribute that belongs to <question> to the
name parameter of the input field (see ??? below).  All I have been able to
figure out is how to get the value of the id attribute belonging to
<choice>:

<xsl:for-each select="document/question">
	<FONT face="Arial"><xsl:process select="description"/></FONT>
	<P></P>
	<xsl:for-each select="choice">
		<TABLE><TR><TD>
		<input type="Radio" name="???"  value="{attribute(id)}"></input>
		</TD><TD>
			<xsl:process-children/>
		</TD>
		</TR>
		</TABLE>
	</xsl:for-each>
	<P></P>
</xsl:for-each>

Thanks,

Dan Walker
Merrimac Interactive Media


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.