|
Subject: Re: [xsl] Path according to a child node attribute From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Mon, 02 Jan 2012 13:08:21 +0100 |
<Class code="B"> <SubClass code="b1"/> <SubClass code="b2"/> <Rubric kind="preferred"> <Label xml:lang="it">FUNZIONI CORPOREE</Label> <Label xml:lang="en">BODY FUNCTIONS</Label> </Rubric> <Rubric kind="definition"> <Label xml:lang="it">Le funzioni corporee sono ..</Label> <Label xml:lang="en">Body functions ...</Label> </Rubric> </Class>
The aim is the same, now it must be chosen the text inside the<Label xml:lang="it"> inside<Rubric kind="preferred"> since there are more kind attributes for<Rubric> element.
<xsl:template match="Class" mode="path">
<xsl:variable name="next" select="key('k1', SuperClass/@code)"/>
<xsl:if test="$next">
<xsl:apply-templates select="$next" mode="path"/>
<xsl:text>/</xsl:text>
</xsl:if>
<xsl:value-of select="concat(@code,' ', Rubric)"/>
</xsl:template>
Martin Honnen --- MVP Data Platform Development http://msmvps.com/blogs/martin_honnen/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Path according to a child, Gian Paolo Bernardin | Thread | Re: [xsl] where's here the error, Matthieu Ricaud-Duss |
| Re: [xsl] where's here the error, Matthieu Ricaud-Duss | Date | Re: [xsl] where's here the error, graham.heath |
| Month |