OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] newbie needs help with xi:include

Hi Jeroen,

Am Samstag, 17. Dezember 2011, 10:40:25 schrieb Jeroen Baten:
> I want to migratie a couple of my books to docbook 5. I have
> exported them to docbook using OpenOffice. But I get an error
> regarding the xi:include element. 
> Can someone tell me what I am doing wrong please?

You have two option:

 (1) Resolve the xi:include elements first
 (2) Validate it with the docbookxi.rn{c,g} schema

Regarding (1):
Before you validate your document, you need to resolve your xi:include 
elements. You can use xmllint with the option --xinclude:

 $ xmllint --xinclude --output book-resolved.xml  book.xml

After you have resolved your xi:include elements, validate your document with 
your DocBook schema.

In theory, you could do the XInclude resolution and validation in one step. 
Unfortunately, RELAX NG validation with xmllint seems to be limited. 

> book.xml:3: element include: Schemas validity error :
> Element
> '{http://www.w3.org/2001/XInclude [3]}include': This element is not
> expected.

Regarding (2):
The DocBook schema comes in two incarnations: one with and the other without 
xi:include elements. If you validate your document with the schema that 
doesn't contain xi:includes, your validation will fail. In that case, you can 
try the other schema (its name is docbookxi.rn{c,g}).

I don't want to complicate things, but there might be some corner cases were 
method (2) still does not work. In that case, use (1) as this is the safest 

Hope this helps.

  Thomas Schraitle

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]