Subject: Re: More entity confusion and my opinion on the right way
From: Keith Visco <kvisco@xxxxxxxxx>
Date: Thu, 07 Jan 1999 11:28:21 -0500
|
Paul,
What would I do without you? :-) Now I have a question on this, and
perhaps I have misunderstood the CDATA section (2.4 of XML rec).
2.4 of the XML rec states...
---
The ampersand character (&) and the left angle bracket (<) may appear
in their literal form only when used
as markup delimiters, or within a comment, a processing instruction,
or a CDATA section.
----
since the & can appear in the literal form, shouldn't it remain in the
literal form when it is written back out from the result tree? I can
understand replacing the standard entities, but an entity not declared
should be left alone if it appears in a CDATA section, right?
IBM's XML for Java (1.1.4) has this behavior this even when I have the
expand entity references flag set to true.
Thanks,
--Keith
certainly
Paul Prescod wrote:
>
> Keith Visco wrote:
> >
> > If you don't want the XSL processor to expand an entity reference,
> > or you don't want to look up "magic numbers" there is an alternative.
>
> This is not an alternative. The output of this:
>
> > <![CDATA[ ]]>
>
> will be:
>
> &nbsp;
>
> That's why this thread arises so often and is always so long.
>
> Paul Prescod - ISOGEN Consulting Engineer speaking for only himself
> http://itrc.uwaterloo.ca/~papresco
>
> "You have the wrong number."
> "Eh? Isn't that the Odeon?"
> "No, this is the Great Theater of Life. Admission is free, but the
> taxation is mortal. You come when you can, and leave when you must. The
> show is continuous. Good-night." -- Robertson Davies, "The Cunning Man"
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|