 |
 |
 |
"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
|
 | 



|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |