|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Attribute values and Ancestors
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








