I am wondering why this Docbook 5.0 document is not valid:
<?xml version='1.0' encoding='utf-8'?>
<article xmlns='http://docbook.org/ns/docbook' xmlns:xlink='http://www.w3.org/1999/xlink' version='5.0'>
<section xml:id='H_0'>
<title>This is a title</title>
<para>
Blah <link linkend='H_0'>This is a link</link>blah blah blah.</para>
</section>
</article>
Here is what I get from xmlstarlet
:
$ xmlstarlet val --err --xsd /usr/share/xml/docbook/schema/xsd/5.0/docbook.xsd test.xml
test.xml:3.22: Element '{http://docbook.org/ns/docbook}section', attribute '{http://www.w3.org/XML/1998/namespace}id': '' is not a valid value of the atomic type 'xs:ID'.
test.xml:6.25: Element '{http://docbook.org/ns/docbook}link', attribute 'linkend': '' is not a valid value of the atomic type 'xs:IDREF'.
test.xml - invalid
I just want internal links in the document, to the sections.
Addition: maybe this is an xmlstarlet problem, as other tools happily process the files. Anyway, I'd be glad if somebody could explain the problem.