[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 I > tried putting the namespace declaration in a top element, as a much shorter > 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: http://www.sagehill.net/docbookxsl/ValidXinclude.html#XincludeDTD Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]