This is the mail archive of the
mailing list .
Re: [docbook-apps] Xmllint error
- From: Daniel Veillard <veillard at redhat dot com>
- To: Kenneth Johansson <ke-joh at sectra dot se>
- Cc: DOCBOOK-APPS <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 7 Oct 2003 06:23:12 -0400
- Subject: Re: [docbook-apps] Xmllint error
- References: <OF02E5F27F.2486CC72-ONC1256DB8.0033F6B7@sectra.se>
- Reply-to: veillard at redhat dot com
On Tue, Oct 07, 2003 at 11:31:23AM +0200, Kenneth Johansson wrote:
> When compiling my modular docbook file I get this xmllint error message.
> What am I doing wrong?
Nothing. It's a problem between DocBook DTD and XInclude.
> $ xmllint --xinclude --postvalid IDS5webUGbook.xml > out.xml
> IDS5web/1_Introduction/chapter_all_introduction.xml:3: No declaration for
> attribute base of element chapter .
Since there seems to be some confusion about the exact problem
let me explain a bit what's going on:
xmllint --xinclude --postvalid does the following:
1/ parse the document, load the DTD but does not validate while
2/ apply the XInclude processing which will recursively traverse
the document(s) and include the new informations gathered from
new documents (or text source)
3/ validate the resulting in-memory tree with the DTD from the
So now what's this base attribute, where does it come from, and why:
1/ it's actually xml:base , an attribute which allows to set the base
for URI-Reference computation done in the subtree of the document.
2/ it is added by XInclude processing to not break references done
from included document. Say that main.xml includes subdir/chapter.xml
and that subdir/chapter.xml references an image img.png .
The rules for references expects the image to be found in subdir/img.png
3/ XInclude has no notion of what in teh included document might
be a reference. So to preserve the linking functionality it mandates
to add an xml:base="subdir/chapter.xml" at the point where the
inclusion occured si that the reference from the resulting document
to the image be preserved.
The consequence is:
- there is nothing to prevent this from an authoring point of view
except keeping all the included fragment in the same directory
as the main document
- the only solution is to get Docbook XML DTD to allow xml:base as
a #IMPLIED attributes on the elements which are likely to be top of
inserted documents. I though this was agreed upon but didn't checked
the progress, Norm or Paul can probably tell us more about this.
At the moment you can safely ignore any [xml:]base attribute error message
resulting from postvalid after XInclude processing.
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
email@example.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
To unsubscribe from this list, send a post to firstname.lastname@example.org, or visit http://www.oasis-open.org/mlmanage/.