This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: xmllint and &
- From: Bart Schuller <schuller at lunatech dot com>
- To: Jeff Beal <jeff dot beal at ansys dot com>
- Cc: "DocBook Mailing List (E-mail)" <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 17 Dec 2002 23:40:47 +0100
- Subject: Re: DOCBOOK-APPS: xmllint and &
- References: <E08C8F26F6901D42B1201763D125853815B3BC@ntdevexc.win.ansys.com>
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 "&"> <!-- AMPERSAND -->
That's not the proper definition of &. It's supposed to be
<!ENTITY amp "&#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.