Make the symbol an ID
attribute so
it can be linked to:
<h2 ID="He">Helium [He]</h2>
Need a way to copy nodes from the input document to attribute values in the output document.
Attribute value templates are the solution. Enclose the XPath expression inside the literal attribute value in curly braces.
<xsl:template match="ATOM">
<h2 id="{SYMBOL}"><xsl:value-of select="NAME"/> [<xsl:value-of select="SYMBOL"/>]</h2>
<ul>
<xsl:apply-templates select="ATOMIC_NUMBER"/>
<xsl:apply-templates select="ATOMIC_WEIGHT"/>
<xsl:apply-templates select="ATOMIC_RADIUS"/>
<xsl:apply-templates select="ATOMIC_VOLUME"/>
<xsl:apply-templates select="DENSITY"/>
</ul>
</xsl:template>
An attribute value can contain multiple attribute value templates interspersed with literal data.