Re: [xml] undeclared prefix not reported



On Thu, Aug 28, 2003 at 06:47:34PM +0200, Tobias Reif wrote:
When I feed

<?xml version="1.0"?>
<foo>
   <bar h:bar="main"/>
</foo>

to

xmllint --noout -

I get no error telling me about the undeclared prefix.
(since xmllint is namespace aware I thought it would require xmlns:h="...")

Is this a bug?

  Yes, I'm surprized it never got noticed ... This is fixed in CVS:

paphio:~/XML -> xmllint --noout tst.xml
tst.xml:3: error: Namespace prefix h of attribute bar is not defined
   <bar h:bar="main"/>
                    ^
paphio:~/XML ->

This allowed to spot an error in one of the regression tests too ...
  Thanks for the report,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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