This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xlink implementation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]