This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: xmllint and &
- From: Daniel Veillard <veillard at redhat 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 14:25:07 -0500
- Subject: Re: DOCBOOK-APPS: xmllint and &
- References: <E08C8F26F6901D42B1201763D125853815B3BC@ntdevexc.win.ansys.com>
- Reply-to: veillard at redhat dot com
On Tue, Dec 17, 2002 at 10:58:04AM -0500, Jeff Beal wrote:
> I'm getting the following error when parsing my documentation with xmllint:
[...]
> 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 -->
>
> Any comments or suggestions on how to fix this without messing with the DTD?
> I have, by the way, verified that xmllint is reading the other character
> entities just fine. It seems only to be a problem with the & entity.
And I don't understand what's happening, no such problem on
a smaller testcase:
paphio:~/XML -> cat tst.xml
<?xml version="1.0" ?>
<!DOCTYPE foobar SYSTEM "tst.dtd">
<foobar></foobar>
paphio:~/XML -> cat tst.dtd
<!ENTITY amp "&"> <!-- AMPERSAND -->
paphio:~/XML -> xmllint --loaddtd --noout tst.xml
paphio:~/XML ->
and it's the first time I heard of such a problem.
however I note that the DTDs installed on my system for DocBook have
<!ENTITY amp "&#38;"> <!-- AMPERSAND -->
instead in docbook/xml-dtd-4.2-1.0-14/ent/iso-num.ent
but older version had the old style declaration but commented:
3.1.7/ent/iso-num.ent:
<!-- predeclared in XML <!ENTITY amp "&"--> <!-- AMPERSAND -->
strange,
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/