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

Re: Disable Output Escaping - really useful

Subject: Re: Disable Output Escaping - really useful
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 23 Mar 2000 10:31:13 GMT
disable output file writing
	Can you explain what "your output tree will not work as expected
        unless it is going to be reparsed" means?

If you go, in a template, 

<p>
this <b>and</b> that
</p>

then your result tree contains 

a p node with three children
 a text node with value "{newline}this "
 a b node, which itself has one text node child with value "and".
 a text node with value " that{newline}"


If you go, in a template, 

<p><xsl:text disable-output-encoding="yes">
this <b>and</b> that
</xsl:text></p>

then your result tree contains 

a p node with one child
  a text node with value "{newline}this <b>and</b> that{newline}"

together with some magic extra information that if writing to a file
that < and > should be written as < and > not &lt; &gt;.

so if you are writing to a file, in the first case the XSL system walks
that tree and produces
<p>
this <b>and</b> that
</p>

as literal characters, the browser parses that as (X)HTML and renders
it as a paragraph with a bold "and".

In the second case you get the same result.


_but_ if you are not writing to a file but instead you are passing the
entire tree straight to a renderer (as happens when you embed an XSL
engine in IE or in FOP or in any other XML system that shares the in
memory tree with the transformation system)

then in the second case the tree the renderer gets does _not_
include a b node, it just has a text node containing the characters <b>
and the special magic XSL information about how those characters should
be rendered has no effect: it doesn't suddenly make <b>and</b> into
a b node as the text string is never parsed as XML syntax, the renderer
is being passed a `ready parsed' XML tree.

So what appears in your IE5 window is the characters
this <b>and</b> that
literally.


> What about the DOCTYPE issue when XT wouldn't output one? Is there a
> non-hack solution to that?

the last few xt releases have supported controlling doctype with
xsl:output so I am not sure what the problem is?


David


 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.