This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: CDATA Help (in SAXON)
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: CDATA Help (in SAXON)
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Wed, 25 Oct 2000 10:23:44 +0100
- Reply-To: xsl-list at mulberrytech dot com
The best place for Saxon-specific questions is saxon.xsl@listbot.com
> Can someone please explain to me why the following :
>
> <![CDATA[<BR/>]]>
>
> ... gets converted to the following when output is set to html :
>
> <BR/>
>
>
> Verbosely: The left less-than bracket is being converted to
> < 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