Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - preserving markup [Thread Next] Re: preserving markupTo: NULL Date: 6/7/2008 9:52:00 AM "David Schwartz" <davids58@g...> wrote in message news:98184477-889b-4e62-86a1-eea3d68e2f73@m...... > I've got some javascript and HTML I want to enter directly into my xml > document. I've entered the JS and HTML content into a tag that's > defined as text in the schema. When I process my xml, the > and < in > the JS and HTML are output as named entitles < and >. As a > result, this content is interpreted by the browser as page content > rather than code/markup to be processed and rendered. > > I've tried using just the non-escaped content as well the following > templates but the named entities always appear in the output. > > <xsl:template match="code"> > <div style="MARGIN-LEFT: 30px"> > <xsl:text disable-output-escaping="yes"><![CDATA[ </ > xsl:text> > <xsl:value-of select="."/> > <xsl:text disable-output-escaping="yes">]]></xsl:text> > </div> > </xsl:template> > > <xsl:template match="code"> > <div style="MARGIN-LEFT: 30px"> > <xsl:value-of select="." disable-output-escaping="yes"/> > </div> > </xsl:template> > > Any help would be appreciated!! > > TIA, > David You have two main options, either convert the HTML to XHTML and store it directly or use a CDATA section and store it in that. -- Joe Fawcett (MVP - XML) http://joe.fawcett.name | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
