![]() |
|
|
|||||||
![]() |
XML - xsl:template - access attribute from one level up |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
If I have the following XML:
<xml> <levelone> <leveltwo attribute="value"> <levelthree attribute2="value2"> Some Value </levelthree> </leveltwo> </levelone> </xml> And the following XSL: <xsl:template match="ns1:levelthree"> ..... </xsl:template> How would I refer to the the value of '@attribute' from leveltwo? I have tried a couple of different ways, but without a lot of luck! Many thanks Darren daz_oldham |
|
|
|
|
#2 |
|
Posts: n/a
|
daz_oldham wrote: > <xml> > <levelone> > <leveltwo attribute="value"> > <levelthree attribute2="value2"> > Some Value > </levelthree> > </leveltwo> > </levelone> > </xml> > > And the following XSL: > > <xsl:template match="ns1:levelthree"> > ..... > </xsl:template> > > How would I refer to the the value of '@attribute' from leveltwo? ../@attribute -- Martin Honnen http://JavaScript.FAQTs.com/ |
|
|
|
#3 |
|
Posts: n/a
|
Thanks Martin - I missed out the fact that I am in fact going up two
levels and not one. You don't have to call me an idiot, I already know Many thanks Darren |
|