[xml] Validating with attribute xml:base



Hello, All!

I have a problem with new libxml2-2.4.24. With version libxml2-2.4.23 all ok.

I use xmllint for validating test xml:

<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
<article>
  <section>
    <title>title1</title>
    <para>
      Text1.
    </para>
    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
      href="refentries/ref1.xml"
      parse="xml"/>
  </section>
</article>

And get error:
$ xmllint --xinclude --noout --noent --postvalid  test.xml
No declaration for attribute base of element refentry
Document test.xml does not validate

But 'base' is not just 'base' - 'xml:base', see below.

When 'href' in xi:xinclude is
href="ref1.xml"
without subdir, validating is ok.
(So many options for xmllint needed for real documents).

ref1.xml:
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
<refentry xmlns:exsl="http://exslt.org/common";>
  <refnamediv>
    <refname>ref1</refname>
    <refpurpose>test</refpurpose>
  </refnamediv>
  <refsect1>
    <title>desc</title>
    <para>test</para>
  </refsect1>
</refentry>

Including all documents into big one producing refentry like:
<refentry xmlns:exsl="http://exslt.org/common"; xml:base="refentries/ref1.xml">
^^^^^^^^

It's my bug?

Sorry for bad English.

PS Link to
ftp://ftp.gnome.org/pub/GNOME/stable/sources/libxml/
from download page possibly broken, server said
"stable: No such file or directory"

--
Regards, Vyt
mailto:  vyt vzljot ru
JID:     vyt vzljot ru




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]