This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xml to html paragraphing
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] xml to html paragraphing
- From: "Pinch, David" <David dot Pinch at ecolab dot com>
- Date: Thu, 29 Mar 2001 13:37:24 -0600
- Reply-To: xsl-list at lists dot mulberrytech dot com
David Carlisle [davidc@nag.co.uk] 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