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


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: xmllint and &


On Tue, Dec 17, 2002 at 10:58:04AM -0500, Jeff Beal wrote:
> When I edit my local copy of the DocBook DTD and remove the following line
> from the iso-num.ent file, everything works:
> <!ENTITY amp "&#x0026;"> <!-- AMPERSAND -->

That's not the proper definition of &amp;. It's supposed to be

<!ENTITY amp    "&#38;#38;"> <!-- AMPERSAND -->

and that's what all copies of iso-num.ent on my machine say. And that's
*if* you explicitly define it. amp, lt, gt, apos and quot are always
defined, even without a DTD.

As for the "why", the answer would have to be "because XML 1.0 says so".
See http://www.w3.org/TR/REC-xml#sec-entexpand for an example in the
spec itself.

-- 
Bart.


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