[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xml to html paragraphing

Subject: RE: xml to html paragraphing
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Thu, 29 Mar 2001 22:46:06 +0100
paragraphing using javascript
David,

<?xml version="1.0" encoding="UTF-8"?>
<doc>
	<text>
	<![CDATA[
	<p>
	 para 1
	</p>
	<p>
	 para 2
	<!--No closing 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">
<html>
<body>
	<xsl:apply-templates />
</body>
</html>
</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


>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Pinch, David
>Sent: 29 March 2001 20:37
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject: RE:  xml to html paragraphing
>
>
>
>David Carlisle [davidc@xxxxxxxxx] said:
>
>> You could probably just have used the
>> disable-output-encoding attribute
>> in XSLT to save using javascript, but this is
>> only a last resort when it
>> isn't possible to fix the source not to
>> have CDATA sections.
>
>I am fetching the user-submitted HTML for display on a web page.  The XSLT
>is generating surrounding elements (e.g., a navigation bar) in addition to
>the user HTML.  I have no guarantee that the user entered well-formed HTML,
>and I don't trust Microsoft's DOM.  I'd rather have a forgiving-browser
>display poorly-formed HTML, than have the entire XSL sheet abort and lose
>the page.
>
>Of course, the JavaScript hack isn't exactly the fastest possible approach
>-- lots of string processing depending on the technique.  And it's probably
>dependent on Internet Explorer (ulg).  Worse comes to worse, I could always
>generate the HTML at the server (e.g., in ASP or JSP) and submit
>it directly
>to the HTTP stream.  But for some reason I like the pure-XSLT approach with
>the web server only acting as a document server.
>
>Thanks for the reply.
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.