This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] xmllint validation of IDREF problem
- From: Sean Wheller <sean at enbaya dot co dot za>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 5 Jan 2005 09:17:35 +0200
- Subject: [docbook-apps] xmllint validation of IDREF problem
- Organization: Enbaya
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