Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: loosing html output in template loosing html output in templateTo: NULL Date: 10/7/2008 10:55:00 AM I can't get my template to let me get html out of it...
Here's the template
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions" >
<xsl:output method="html" version="1.0" encoding="UTF-8"
indent="yes" />
<xsl:template name="replace">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="contains($string,'
')">
<span style="color:red;">
Top
<xsl:value-of select="substring-before($string,'
')"/>
<BR />Bottom
</span>
<xsl:call-template name="replace">
<xsl:with-param name="string" select="substring-
after($string,'
')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Here's how I use it later...
<xsl:variable name="MyVar">
<xsl:call-template name="replace">
<xsl:with-param name="text" select="@MyNode"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$MyVar" />
Make any note with "Blablabla
secondlineblablabla"
other things in my xsl will output html, but not in my template here.
Top is shown, bottom is show and so is "blablabla... " but I don't
get any html output.
Why can't I get html output inside this template??? I'm going crazy.
Please help and let me know if you need more info. Thanks again!
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
