[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: "Pinch, David" <David.Pinch@xxxxxxxxxx>
Date: Thu, 29 Mar 2001 11:31:52 -0600
david pinch
Hello Java XML,

I experienced a similar problem in the past and perhaps this hack will get
you started.  I allow clients to submit entries using a rich editor such as
the Microsoft DHTML Edit Control or IE55 DIV.ContentEditable.  My
application receives the data and stores it in a SQL Server 2000 database.
Getting the user HTML is easy.  Re-displaying the HTML is a bit tricker...

My XML SQL Server query returns the user-entered HTML in a CDATA wrapper.
This ensures proper compliance with XSLT but makes the HTML tags appear as
plain-text to the web browser.  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.

Specifically, I assign the escaped data to the innerHTML property of some
HTML element, such as a DIV or SPAN.  It renders properly on IE55.  I have
not tested Netscape.  I'm not an expert at XSL, XSLT, etc., and I'm sure
there's probably a better way of doing this.  Maybe this will give you some
ideas.

Email if you want specific examples.


-----Original Message-----
From: Java XML [mailto:jaxlive@xxxxxxxxxxx]
Sent: March 29, 2001 08:46
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  xml to html paragraphing


Hi Peter,
             But i have the para tags in within the text of the element so 
there is not need to worry about inserting the tags but now my problem is 
when i generate an html the tags are show as &lt;p&gt;
thats the problem now is there a way so that i can output the tags as it is 
and these tags are in the cdata section of the element is ther a way to 
disable the escaping...

 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-2011 All Rights Reserved.