Subject: Re: [xsl] how to store attribute value? From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx> Date: Tue, 06 Aug 2002 14:30:17 +0200 |
I have a xml document as: <myroot root_attribute="test_val"> <a1/> <a1/> </myroot> While processing the node "a1" using XSL, i need to access the value of attribute "root_attribute" of it's parent.
<xsl:template match="a1"> <xsl:value-of select="../@root_attribute"/> <!-- Or the same in nonsimplified syntax --> <xsl:value-of select="parent::*/attribute::root_attribute"/> </xsl:template>
That's what XPath expresions are for.How can i access the attribute of some node in the template match of another node?
-- Oleg Tkachenko Multiconn International, Israel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] how to store attribute value?, Vinoth Palaniappan | Thread | RE: [xsl] how to store attribute va, Michael Kay |
Antwort: Re: [xsl] two xml source d, Markus . Lehr | Date | [xsl] xml-stylesheet and entities, Nathan Shaw |
Month |