This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xlink implementation
- From: "Slava Sedov" <slava dot sedov at imge dot ru>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 20 Feb 2002 19:37:04 +0500
- Subject: [xsl] xlink implementation
- Reply-to: xsl-list at lists dot mulberrytech dot com
For example i have xml-fragment like this:
<item>Item1</item>
<item xlink:href="somewhere1" xlink:type="simple">Item2</item>
<item>Item3</item>
<item xlink:href="somewhere2" xlink:type="simple">Item4</item>
and xsl-fragment like this:
<xsl:template match="item[@xlink:type='simple']">
<a><xsl:attribute name="href"><xsl:value-of
select="@xlink:href"/></xsl:attribute><xsl:value-of select="."/></a>
</xsl:template>
<xsl:template match="item">
<xsl:value-of select="." />
</xsl:template>
It work fine. But now assume that "item" replaced to more abstract tissue as
"node()" and <xsl:value-of select="."/> turned into <xsl:apply-templates
select="."/>. As result - stack overflow (first template call itself because
it have higher priority). Is here exist elegant way to solve this task?
The best that i can suggest is using <xsl:apply-imports/> but yet not check
it.
With best wishes,
Slav
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list