[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Xmllint error
Thanks, that was a thourough answer. Maybe something for the DocBook FAQ? /Kenneth -------------------------------------------------------- Kenneth Johansson Technical Documentation Manager Sectra Imtec AB Teknikringen 2 E-mail: ke-joh AT sectra DOT se SE-583 30 Linköping Phone: +46 13 23 52 00 SWEDEN Web: http://www.sectra.se > > -----Original Message----- > From: Daniel Veillard [mailto:veillard@redhat.com] > Sent: Tuesday, October 07, 2003 12:23 > To: Kenneth Johansson > Cc: DOCBOOK-APPS > > On Tue, Oct 07, 2003 at 11:31:23AM +0200, Kenneth Johansson wrote: > > Hi, > > > > 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 > parsing > 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 > "main" document. > > 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 > > > > -- > 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/ >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]