|
Subject: Re: Attribute values and Ancestors From: James Clark <jjc@xxxxxxxxxx> Date: Wed, 16 Dec 1998 11:25:20 +0700 |
Try "{../attribute(id)}".
Dan Walker wrote:
>
> 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>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Attribute values and Ancestors, Dan Walker | Thread | Dec16 - fo tables, Andy Dent |
| Re: Is this valid?, James Clark | Date | RE: alternating tags in a list?, keshlam |
| Month |