[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: xmllint validation of IDREF problem
I am having the following problem when validating a document and can't seem to fix it. Hope somebody knows why. xmllint --noout --xinclude --postvalid faqguide/faq2.xml faqguide/faq2.xml:15: element link: validity error : IDREF attribute linkend references an unknown ID "sect-general" I have checked to see if an element with the id="sect-general" exists in the document and it does. BTW faq2.xml is the main file using a combination of XInclude and External Entities for inclusion of smaller XML instances. SAMPLE FROM FAQ2.XML --------------------------- <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ <!ENTITY % xinclude SYSTEM "../libs/xinclude.mod"> %xinclude; <!ENTITY % globalent SYSTEM "../libs/global.ent"> %globalent; ]> ... <preface id="chap-faq-intro"> <title>Preface</title> &general-notes; &conventions; &feedback; <sect1 id="sect-acknowledge"> <title>Acknowledgements</title> <!-- The inclusion --> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="faqs/Repositories.xml"> <xi:fallback> <para> <emphasis>FIXME: MISSING XINCLUDE CONTENT</emphasis> </para> </xi:fallback> ... DEFINITION OF EXTERNAL ENTITY IN GLOBAL.ENT ------------------------------------------------------- <!ENTITY general-notes SYSTEM '../common/general-notes.xml'> IN GENERAL-NOTES.XML --------------------------- <sect1 id="sect-general"> <title>General Notes</title> SAMPLE REPOSITORIES.XML LINKING TO ID ------------------------------------ <orderedlist> <listitem> <para>Read <link linkend="sect-general">General Notes</link> </para> </listitem> As I understand the --postvalid should cause xmllint to validate a complete or expanded XML instance of faq2.xml so the XIncudes and External Entities should already be expanded in the tree. I have the same problem on a number of points where documents make links to documents outside themselves. Xerces returns the same results, but I am not sure that it does the --postvalid thing of xmllint. -- Sean Wheller sean@enbaya.co.za http://www.enbaya.co.za
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]