Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - loosing html output in template [Thread Next] Re: loosing html output in templateTo: NULL Date: 10/7/2008 8:47:00 PM Without the context (the original XML document) we can only guess what your input looks like. However by selecting @MyNode it suggests you've embedded all your "HTML" in some attribute, which really is not suited to storing markup. In any case, you would need to use <xsl:copy-of select="$MyVar" /> not value-of (which copies only the text content of the parameter) HTH Cheers - Neil On Tue, 7 Oct 2008 10:55:16 -0700 (PDT), ujjc001@g... wrote: >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! ------------------------------------------------ Digital Media MVP : 2004-2008 http://mvp.support.microsoft.com/mvpfaqs | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
