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] | [Elist Home]


Subject: RE: DOCBOOK-APPS: XInclude doesn't validate with xmllint


On Wed, 2002-10-02 at 11:41, Jeff Beal wrote:
> No one seems to have mentioned this yet, and it may just be a typo in your
> e-mail, but the element has to be 
> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="Called.xml"/>, 
> not just <xi xmlns:xi="http://www.w3.org/2001/XInclude"; href="Called.xml"/>
>

It turns out to be a combination of problems:
1) as Jeff pointed out, it should be xi:include (my error)
2) I needed to remove the --valid option and use --postvalid for xmllint

Also, xmllint puts out the SGML_CATALOG_FILE message (see below) if you
use the default /etc/xml/catalog.  So the non-use of catalogs does not
apply.

 
> -----Original Message-----
> From: John Himpel [mailto:jwhimpel@tseinc.com]
> Sent: Tuesday, October 01, 2002 10:35 PM
> To: docbook-apps@lists.oasis-open.org
> Subject: DOCBOOK-APPS: XInclude doesn't validate with xmllint
> 
> 
> Greetings,
> 
> I am trying to validate two xml files using the modular document
> technique that Bob Stayton shows in www.sagehill.net.
> 
> My version of xmllint:
> xmllint: using libxml version 20423
> 
> File: Caller.xml
> <?xml version='1.0' encoding='utf-8' ?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
>                      
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; >
> <book id="XFree86">
> <title>XFree86 Documentation (Docbook Version)</title>
> <xi xmlns:xi="http://www.w3.org/2001/XInclude"; href="Called.xml" />
> </book>
> 
> File: Called.xml
> 
> <?xml version="1.0"?>
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
>                         
> "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; >
> 
> <chapter id='Called'>
>   <title>
>        Chapter Title.
>   </title>
> 
>   <section>
>     <title>Preface</title>
>     <para>Simple paragraph.</para>
>   </section>
> </chapter>
> 
> Command:
> xmllint --catalogs --noout --xinclude  --valid --dtdvalid
> http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd Caller.xml
> 
> Result:
> Variable $SGML_CATALOG_FILES not set
> Caller.xml:6: validity error: No declaration for attribute href on
> element xi
> <xi xmlns:xi="http://www.w3.org/2001/XInclude"; href="Called.xml" />
>                                                                  ^
> Caller.xml:6: validity error: No declaration for element xi
> <xi xmlns:xi="http://www.w3.org/2001/XInclude"; href="Called.xml" />
>                                                                   ^
> Caller.xml:7: validity error: Element book content doesn't follow the
> DTD
> Expecting ((title , subtitle? , titleabbrev?)? , bookinfo? , (dedication
> | toc | lot | glossary | bibliography | preface | chapter | reference |
> part | article | appendix | index | setindex | colophon)*), got (title
> xi )
> </book>
>       ^
> Element book content doesn't follow the DTD
> 
> I don't know if the problem is DocBook or if the problem is xmllint.
> 
> Any pointers or suggestions would be welcome.
> 
> Thanks




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


Powered by eList eXpress LLC