Re: GOTCHA!

Subject: Re: GOTCHA!
From: "Oren Ben-Kiki" <oren@xxxxxxxxxxxxx>
Date: Thu, 14 Jan 1999 10:28:24 +0200
Tyler Baker <tyler@xxxxxxxxxxx> wrote:

>The best way to use this I would think for HTML would be to:
>
>(1) Define a special character that represents &nbsp such as some rarely
used
>character in the Unicode table.
>(2) Parse the XML source tree and XSL stylesheet
>(3) In the XSL Processor build up the entity table to escape all entities
with
>the value of that special character (or string of characters) which
represent
>&nbsp;
>
>This I feel would be more natural than trying to use CDATA all over the
place
>for escaping HTML entities.
>
>Any comments here...


I wasn't thinking about emitting character entities - I was thinking about
emitting arbitrary embedded JavaScript code, something which is now
impossible. XML position of character entities - that as long as the
in-memory representation is OK, the textual one doesn't matter - is pretty
reasonable, IMVHO. If one wants to override the output representation (say
using &nbsp; instead of &#160;(?)), then there should be a special
<xsl:char-entity> tag to force the output representation. For the life of me
I can't see why this (and <xsl:cdata>) is a tough decision. The output is
always valid XML. You can still verify that the output matches a given DTD
(including verifying character entities), it is declerative, in the spirit
of XSL. I can understand limiting the output to valid XML, but why not allow
_all_ of XML? How come <xsl:comment> made it in, and these two haven't? A
mystery, indeed.

Oren Ben-Kiki.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread