forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Noels <stev...@outerthought.org>
Subject Re: [RT] Entities in XML docs
Date Fri, 27 Dec 2002 23:12:33 GMT
Stefano Mazzocchi wrote:

> But there is *one* thing where entities are very handy: char expansion.
> 
> Stuff like
> 
>  &raquo;
>  &copy;
>  &nbsp;
> 
> are something will be hard to go along without.

My typical advice: if you can't find it in the list of (5) predefined 
entities, and you can't find it on your keyboard or your XML editor 
messes up, use *character references* instead. They are ugly but portable.

If we encourage people to use non-XML constructs for things for which we 
have perfectly valid counterparts in the spec, we alienate them from 
possible portability: reusing a document across XML processing 
environments which uses &#xA9; instead of ${ch:copy} is a nice example. 
Admittedly &#xA9; looks ugly, but it will work in each decent XML 
processing environment, whereas our shortcuts won't.

> And this is the reason why I think that having something like
> 
>  ${ch:raquo}
>  ${ch:copy}
>  ${ch:nbsp}
> 
> will make it possible to have the same funtionality without the need for 
> a DTD.

Yes for text fragments, no for glyphs outside our keyboard range.

I like your position on what XML standards one should use, BTW. 
Unfortunately, the amount of RNG-implementing tools is still quite small.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0103539/
stevenn at outerthought.org                stevenn at apache.org


Mime
View raw message