I'm new to XSLT and I'm trying to grab the content of an attribute I've just created.
I have some XML, like the following:
<subpara id="subpara">
<title>I am some heavy title</title>
<para id="para">Here is some dummy text for a dummy para.</para>
<table id="t01" tocentry="1">
...
in XSLT, I do:
<xsl:template match="subpara/title">
<div>
<xsl:attribute name="class">
<xsl:text>title</xsl:text>
<xsl:call-template name="addChangeClasses"/>
</xsl:attribute>
<xsl:attribute name="data-numbering">
<xsl:apply-templates select="parent::*" mode="numbering"/>
</xsl:attribute>
# HERE I'D LIKE TO HAVE THE CONTENT OF THE ATTRIBUTE I JUST CREATED
<xsl:value-of select"@data-numbering"/>
<xsl:apply-templates/>
</div>
</xsl:template>
My intent is to create that output:
<div class="title" data-numbering="1.1">1.1 - I am some heavy title</div>
So I'm creating an attribute data-numbering, but I'd like to display its content.
Obviously, doing <xsl:value-of select="@data-numbering"/> is not the proper way.
Anyone can help me, please ? Thanks in advance ! :)