M
Martin Plantec
This is a very simple question, from a beginner in XSLT.
Suppose my XML says
<para>The word <a href="there.html">link</a> goes there.</para>
What XSLT rule would preserve the a element with all attributes?
By now I have learned I can write:
<xsl:template match="a">
<a><xsl:apply-templates /></a>
</xsl:template>
but this looses the attribute. And including no special rule for the a
element will suppress it from output. And also: if I have a 10 elements
for which this is what I want to do, is there a shorthand to treat all
of them in this way (i.e. keeping everything as in source).
Thanks!
Martin
Suppose my XML says
<para>The word <a href="there.html">link</a> goes there.</para>
What XSLT rule would preserve the a element with all attributes?
By now I have learned I can write:
<xsl:template match="a">
<a><xsl:apply-templates /></a>
</xsl:template>
but this looses the attribute. And including no special rule for the a
element will suppress it from output. And also: if I have a 10 elements
for which this is what I want to do, is there a shorthand to treat all
of them in this way (i.e. keeping everything as in source).
Thanks!
Martin