su wrote:
I want to tranform following
<extends>/public/a1.xml</extends>
into
<extends xlink:type="simple" xlink:href="/public/a1.xml"></extends>
using XSL.
<xsl:template match="extends">
<xsl:copy>
<xsl:attribute name="xlink:type"
namespace="http://www.w3.org/1999/xlink">simple</xsl:attribute>
<xsl:attribute name="xlink:href"
namespace="http://www.w3.org/1999/xlink"><xsl:value-of
select="."/></xsl:attribute>
</xsl:copy>
</xsl:template>
is one way that is rather generic, it might suffice to use the much shorter
<xsl:template match="extends">
<extends
xlink:type="simple"
xlink:href="{.}"
xmlns:xlink="http://www.w3.org/1999/xlink" />
</xsl:template>
--
Martin Honnen
http://JavaScript.FAQTs.com/