RE: [xsl] xml to html paragraphing

Subject: RE: [xsl] xml to html paragraphing
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Thu, 29 Mar 2001 19:46:02 +0100
David,
>  I resolved the problem by writing a small,
>client-side JavaScript function that takes the "escaped" HTML and converted
>it to valid HTML using the client-side DHTML DOM.

You shouldn't need to do that.

<?xml version="1.0" encoding="UTF-8"?>
<doc>
	<text>
	<![CDATA[
	<p>
	 para 1
	</p>
	<p>
	 para 2
	</p>
	]]>
	</text>
</doc>

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="doc">
<doc>
	<xsl:apply-templates />
</doc>
</xsl:template>
<xsl:template match="text">
	<xsl:value-of disable-output-escaping="yes" select="." />
</xsl:template>
</xsl:stylesheet>

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread