This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
xmllint bug?
- From: Bob Stayton <bobs at caldera dot com>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Sun, 24 Nov 2002 13:46:08 -0800
- Subject: DOCBOOK-APPS: xmllint bug?
In answering a previous question about where to
put the email tag in a bookinfo element, I decided
to test my answer. xmllint says it is invalid.
It looks valid to me, and nsgmls thinks it is valid too.
Here is the shortened sample that should validate with
the DocBook XML 4.2 DTD:
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"../docbook42/docbookx.dtd">
<book>
<bookinfo>
<title> .. </title>
<author>
<firstname> .. </firstname>
<surname> .. </surname>
<email> .. </email>
</author>
</bookinfo>
</book>
Here is what xmllint (version 20423) says:
$ xmllint --noout --valid invalid.xml
invalid.xml:11: validity error: Element author content doesn't follow the DTD
Expecting ((personname | honorific | firstname | surname | lineage | othername |
affiliation | authorblurb | contrib+) , (personblurb | email | address)*), got
(firstname surname email )
</author>
^
Here is the content model of author in 4.2:
((personname|(%person.ident.mix;)+),(personblurb|email|address)*)
and here is %person.ident.mix:
<!ENTITY % person.ident.mix
"honorific|firstname|surname|lineage|othername|affiliation
|authorblurb|contrib %local.person.ident.mix;">
The example has firstname and surname (and no personname)
to satisfy the group before the comma, followed by email which
is part of the group after the comma. It should validate,
shouldn't it? Am I missing something?
Or is xmllint misinterpreting the content model?
It seems to have dropped a set of parens, the ones around
the parameter entity.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com