Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - help needed with xlink:href >Thread Next - Re: help needed with xlink:href Re: help needed with xlink:hrefTo: NULL Date: 6/2/2006 11:29:00 AM
On Thu, 01 Jun 2006 14:10:22 +0200, adMjb <adam.mjbarnes@g...> wrot=
e:
> But my output is wrong, I want the weblink to be part of the text
> somthing like this:
If you want to output elements as well, you shouldn't be using =
'xsl:value-of': it only returns text.
Rather, use 'xsl:apply-templates' as much as you can:
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<xsl:stylesheet version=3D"1.0"
xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
xmlns:xlink=3D"http://www.w3.org/1999/xlink"
exclude-result-prefixes=3D"xlink">
<xsl:output method=3D"xml" version=3D"1.0" encoding=3D"UTF-16"
indent=3D"no"/>
<xsl:template match=3D"document">
<root>
<end>
<xsl:for-each select=3D"//endnote">
<endNoteText>
<endNum>
<xsl:number level=3D"any" format=3D"1"/>
</endNum>
<xsl:apply-templates />
</endNoteText>
</xsl:for-each>
</end>
</root>
</xsl:template>
<xsl:template match=3D"link">
<link href=3D"{@xlink:href}">
<xsl:apply-templates />
</link>
</xsl:template>
</xsl:stylesheet>
-- =
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Veni, vidi, wiki (http://www.wikipedia.org)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
