|
Subject: Re: access attribute in the parent element. From: WCB <WCBorg@xxxxxxxxxxxx> Date: Tue, 20 Jun 2000 20:06:30 -0700 |
The abbreviated syntax to refer to the parent node is ".." [In case you're interested, the full function is "from-parent(node())"]
To specify the attribute "first" use "@first". Stringing them together with a "/" and substituting it in the select statement gives:
<xsl:template match="COUNTRY">
<xsl:value-of select="../@first"/>
</xsl:template> <NAME first="john" last="mike">
<COUNTRY></COUNTRY>
</NAME>How can i get the value of an attribute from a parent element/from an element in the top of the hirarchy.
<NAME first="john" last="mike"> <COUNTRY><COUNTRY> </NAME>
<xsl:templte match "NAME"> <xsl:apply-templates/> </xsl:template>
<xsl:template match="COUNTRY"> <xsl:value of select=??, i want value of first> </xsl:template?
Regards.
__________________________________________________ Do You Yahoo!? Send online invitations with Yahoo! Invites. http://invites.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| access attribute in the parent elem, srirangababu thimmai | Thread | RE: access attribute in the parent , Kay Michael |
| access attribute in the parent elem, srirangababu thimmai | Date | Re: Cascading. ( Re: Recursive Temp, Paul Tchistopolskii |
| Month |