[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] xlink implementation


Subject: [xsl] xlink implementation
From: "Slava Sedov" <slava.sedov@xxxxxxx>
Date: Wed, 20 Feb 2002 19:37:04 +0500

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



Current Thread