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

RE: disable-output-escaping="yes" and crimson JDK1.4.1

Subject: RE: disable-output-escaping="yes" and crimson JDK1.4.1 parser does not work (or is disabled)
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 6 Jan 2003 18:04:35 -0500
html disable output escaping
[Andrew Milkowski]
> 
> my desired output is to produce unescaped html output in form 
> of &lt;html&gt;test&lt;
> 

If that is exactly what you want, then it is __escaped__, not
__unescaped__!  Also, you do not need the xsl:text element because your
contents are already text.  It turns out, though that different
processors serialize escaped output differently when the output method
is "html", as you have it.  Here are four results for your construction
(I eliminated the extra whitespace you have in your fragment) -

Msxml3: <header text="<html>test</html>">
Saxon 6.5x: <header text="<html&gt;test</html&gt;">
Xalan (uncertain version): <header text="<html>test</html>">
Sablotron 0.7: <header text="<html>test</html>">

This is quite strange and not what anyone wants!

However, your proposed output is not html at all.  Html does not have
"header" and "chart" elements.  It seems to me that you really want to
produce xml from which you will later extract the "text" attribute of
the header element and stick it into an html file.  Is that right?  If
so, just use the xml output method and everything will be escaped
properly.

However, if that is your plan, it is not a very good idea, because you
will then have to produce markup from non-markup text that would look
like markup if the escaped characters were displayed as unescaped.  It
would be much better to write your html fragments as well-formed xml,
and make them child elements rather than attributes.  It might look like
this -

<header>
   <component visible="true" font="Arial-plain-22"
foreground="#0066FF"/>
   <markup><html>test</html></markup>
</header>

It would be perfectly simple to extract such fragments into an html
file.

Cheers,

Tom P 

 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.