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] 5 Questions: from PHP tags to XIncludes

----- Original Message ----- 
From: "Frans Englich" <frans.englich@telia.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Friday, July 23, 2004 11:52 PM
Subject: [docbook-apps] 5 Questions: from PHP tags to XIncludes

> 5.
> I use XIncludes(with xsltproc/xmllint) in one of my files extensively, so
> tried putting the namespace declaration in a top element, as a much
> solution compared to declaring it in each element where it's used. But
> xmllint complained. Shouldn't I be able to do like this(plain xml syntax)?
> <book xmlns:xi="http://www.w3.org/2001/XInclude";>
> [...]
> <xi:include  href="kua1.xml" />
> [...]
> </book>
> bash-2.05b$ make check
> xmllint --nonet --xinclude --postvalid --noout kua*.xml book.xml
> book.xml:5: element book: validity error : No declaration for attribute
> xmlns:xi of element book
> Document book.xml does not validate
> make: *** [check] Error 3
> bash-2.05b$

Putting the namespace declaration in the book element is sufficient to
declare the namespace for the document, but it doesn't make xi:include a
valid attribute on any elements.  The DTD determines what attributes are
valid because DocBook is not in its own namespace.  See this reference for
more info for validing with XIncludes:


Bob Stayton
Sagehill Enterprises
DocBook Consulting

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