This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strange definition of & and < in iso-num.ent


Alexander Dupuy wrote:
> In the XML entities file iso-num.ent (ISO Numeric and Special Graphic 
> Entities V0.3 $Id: iso-num.ent,v 1.3 2002/06/13 17:39:20 nwalsh Exp $) 
> there are the following two rather odd definitions of & and <:
> 
> <!ENTITY lt     "&#38;#60;"> <!-- LESS-THAN SIGN -->
> <!ENTITY amp    "&#38;#38;"> <!-- AMPERSAND -->
> 
> which effectively define the &lt; entity as "&#60;" and &amp; as "&#38;".
> 
> In practice, this has little effect, since the XML spec predefines &amp; 
> and &lt; as "&" and "<", and most tools won't modify those definitions, 
> but it can cause some confusion.  You can see somebody relying on these 
> definitions in http://www.mulberrytech.com/quickref/XMLquickref.pdf 
> (where, on the second page, the list of Predefined General Entities 
> gives these strange definitions of &amp; and &lt;).
> 
> Unless there is some subtle reason beyond my understanding why these 
> definitions should be given as such, they should probably be corrected 
> in the next release.

They are correct and are required to be declared this way, due to the way
internal entity declarations are processed. This is explained in the XML spec
(2nd edition, or in erratum 80 of the original)...

See http://www.w3.org/TR/REC-xml#sec-predefined-ent

Did you run across a parser that is having trouble with them?

Mike

-- 
  Mike J. Brown   |  http://skew.org/~mike/resume/
  Denver, CO, USA |  http://skew.org/xml/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]