[xml] Re: XInclude produced invalid document



On Tue, 11 Nov 2003 06:14:49 -0500
Daniel Veillard <veillard redhat com> wrote:

On Tue, Nov 11, 2003 at 01:59:53PM +0300, Vitaly Ostanin wrote:
Hello, All!

In the attached test I get invalid document:

$ xmllint --valid final.xml 
final.xml:946: parser error : EntityValue: '%' forbidden
except for entities references<!ENTITY percnt "%">

final.xml is result of XInclude processing from main.xml (DTD
DocBook) and included.xml (our extension for DTD DocBook).

When included.xml uses DTD DocBook, XInclude produce valid
document.

I try current cvs version (from anoncvs.gnome.org:/cvs/gnome)
and error still exists.

$ xmllint --version
xmllint: using libxml version 20602
   compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath
XPointer XInclude Iconv Unicode Regexps Automata Schemas

Please, tell me, it's error in our extension for DTD DocBook
or in the libxml2 ?

  I can't tell... I don't know where the
   <!ENTITY percnt "%">

This entity declaration produced by XInclude processing into
result tree. AFAIK, this declaration must be:
<!ENTITY percnt "&#x0025;">

which is an error comes from.
Please make more debugging on your side, I just can't guess
myself what's happening there, especially if you modified DTDs.

I'm sure what it isn't error in the customized DTD, I attach
second variant of testcase. Now modified DTD is:

<!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
%DocBookDTD;

as described in "Customizing DocBook":
http://docbook.org/tdg/en/html/ch05.html

Should I fill a bug report in bugzilla?

<skipped/>

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

Attachment: xinclude-test-2.tar.bz2
Description: BZip2 compressed data



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