Re: More entity confusion and my opinion on the right way

Subject: Re: More entity confusion and my opinion on the right way
From: Keith Visco <kvisco@xxxxxxxxx>
Date: Wed, 06 Jan 1999 11:04:23 -0500
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.
Escape it with CDATA...this may not be pretty, but it gets the job done.

<![CDATA[&nbsp;]]>

<![CDATA[&my-non-expanded-and-non-declared-entity;]]>

-Keith


"Pawson, David" wrote:
> 
> Ken Holman gives us (yet another) nice example in use.
> 
>  greeting.xml
> <?xml version="1.0"?>
> <?xml:stylesheet type="text/xsl" href="greeting.xsl"?>
> <greeting><emphasis>Hello</emphasis>&#160;World!</greeting>
> 
> Could I support Andrews position of confusion by proffering an
> idiots view.
> 
> The simple, I want statement,  goes something like:
> 
> 'show me how to get from either the XML file (source document usage)
> or stylesheet introduced entity usage, without having to repeatedly
> look out the magic numbers.'
> 
> What entity definitions should I use to keep it simple?
> Can I use the same definitions in both my style sheet
> and source document?
> 
> given
>         <!ENTITY igrave CDATA "&#236;">
> can I then use this with its (relatively) meaningful &igrave; rather
> than the &#236;
> 
> At least we then might have a consistant process to follow, rather
> than meeting the confusion Andrew so graphically demonstrates.
> 
> I accept Chris M's explanation, but stand back from it as one
> who never will think to such depths.
> 
> If XSL is meant more for the idiots such as myself, then KISS
> is a good approach.
> 
> my two penneth, DaveP
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread