After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152623 - xmllint does not display the right filename on errors in xincluded files
xmllint does not display the right filename on errors in xincluded files
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.13
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-14 15:47 UTC by Nico R.
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nico R. 2004-09-14 15:47:35 UTC
Given these three files: 
 
-----BEGIN silly.dtd----- 
<!ELEMENT two (test*)> 
<!ELEMENT one (two)> 
<!ATTLIST test foo (bar|buz) "bar"> 
<!ELEMENT test (#PCDATA)> 
-----END silly.dtd----- 
 
-----BEGIN one.xml----- 
<?xml version='1.0'?> 
<!DOCTYPE one SYSTEM "silly.dtd"> 
<one> 
  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="two.xml"/> 
</one> 
-----END one.xml----- 
 
-----BEGIN two.xml----- 
<?xml version='1.0'?> 
<two> 
  <test>Testing.</test> 
  <test foo="baz">This is a test.</test> 
</two> 
-----END two.xml----- 
 
 
Issue the following command: 
xmllint --nonet --noout --postvalid --xinclude one.xml 
 
xmllint outputs: 
one.xml:4: element test: validity error : Value "baz" for attribute foo of 
test is not among the enumerated set 
Document one.xml does not validate 
 
 
But the error is in two.xml:4 ("baz" instead of "bar" or "buz"), not in 
one.xml:4.
Comment 1 William M. Brack 2004-10-02 03:53:11 UTC
I added some code to the error printing routine to improve this.  It depends 
upon the XML_XINCLUDE_START/END nodes, and should provide what you want as long 
as those nodes are not suppressed.  Fixed code is in CVS (error.c) - thanks for 
the report.
Comment 2 Daniel Veillard 2004-10-28 07:24:34 UTC
This should be fixed in release 2.6.15,

  thanks,

Daniel