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

RE: CDATA Help (in SAXON)

Subject: RE: CDATA Help (in SAXON)
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 25 Oct 2000 10:23:44 +0100
saxon cdata
The best place for Saxon-specific questions is saxon.xsl@xxxxxxxxxxx
 
> Can someone please explain to me why the following :
> 
>     <![CDATA[<BR/>]]>
> 
> ... gets converted to the following when output is set to html :
> 
>     &lt;BR/>
> 
> 
> Verbosely: The left less-than bracket is being converted to 
> &lt; while the right
> is left untouched... ideally I would like them to BOTH be 
> left untouched...

Because the angle brackets are in a CDATA section, they are ordinary
characters, not markup, so they have to be output as ordinary characters.
This means they have to be output in a way that ensures they will not be
mistaken for markup. In this particular context, ">" will not be taken as
markup, but "<" will, this is why one is escaped and the other isn't.

In fact, the latest Saxon release reverts to escaping both "<" and ">"
because of the special problems of handling "]]>".

If you want the characters output as markup, then either (a) remove the
CDATA wrapper, or (b) use disable-output-escaping="yes" on the
<xsl:value-of> or <xsl:text> instruction.

> as a side note... what version of SAXON removed method 
> makeStyleSheetInstance from com.icl.saxon.PreparedStyleSheet?

The changes.html file provides a fairly complete record of what changes were
made when. I've been gradually moving towards the (still unfinished) TrAX
API. The equivalent in TrAX is newTransformer().
> 
> I'm afraid I don't know what version of SAXON I have.

Just run it with the -t option from the command line and it will tell you.

Mike Kay


 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.