Return-Path: Mailing-List: contact general-help@xml.apache.org; run by ezmlm Delivered-To: mailing list general@xml.apache.org Received: (qmail 19664 invoked from network); 17 Mar 2000 00:04:54 -0000 Received: from mail.centera.com (HELO mikasa.centera.com) (204.144.157.10) by 63.211.145.10 with SMTP; 17 Mar 2000 00:04:54 -0000 Received: by mail.centera.com with Internet Mail Service (5.0.1460.8) id ; Thu, 16 Mar 2000 17:04:53 -0700 Message-ID: From: Brian Dupras To: "XSL - Mulberry (E-mail)" , "Xml-Apache (E-mail)" Subject: XHTML with Namespaces -> HTML 4.0 Loose Date: Thu, 16 Mar 2000 17:04:52 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain X-Spam-Rating: 63.211.145.10 1.6.2 0/1000/N I have an interesting dilema - I need to convert a bunch of Data, Text, and XHTML (with namespaces) into HTML4. The spin is that the Data may contain user-input html elements that my system treats as opaque. For instance, I give the user a form to enter text. If they type in "This is a sample.", then I generate This is a sample. by using DOM and addTextNode(). If they type in "This is an HTML sample.", then I generate This is an <b>HTML<b> sample. by using the same DOM addTextNode(). What I need to do is pull that same XML out of storage and spit out to the browser, "

This is an HTML sample.

" using XSLT if I can. There are two things here. First, I need to be sure that my own elements get translated to valid HTML 4 (singular
tags from , for example). Also, I need to pass through the user's input text, including and valid or broken HTML tags that they typed in. The XSLT doc I wrote to do that is presently not working properly. It is included below. I'm sure this is just a matter of getting the output-method, output escaping, text formatting, etc all set up properly. I could use some pointers here, though. By specifying that the output-method is "html", I should get some singular tags like
. But, in my output from below, I'm still getting
. I think this might have to do with creating the elements from scratch useing . If I pass in the above html example, the xslt below spits out "This is an <b>HTML<b> example.", which obviously causes the tag to render to the page instead of bolding the text. Thanks for any advice. Brian Dupras Centera Information Systems, Inc. phone 303.381.4420 (direct) phone 303.939.0200 (operator) fax 303.939.0111 web http://www.centera.com email briand@centera.com My broken XHTML -> HTML xslt: