Bug#259002: [xml/sgml-pkgs] Bug#259002: xmllint doesn't recognize namespace correctly

Daniel Veillard veillard@redhat.com, 259002@bugs.debian.org
Tue, 13 Jul 2004 08:19:18 -0400


On Tue, Jul 13, 2004 at 01:21:01PM +0200, Roland Stigge wrote:
> On Tue, 2004-07-13 at 11:15, Mike Hommey wrote:
> > Roland Stigge wrote:
> > > Hi,
> > > 
> > > the attached file causes the following:
> > > 
> > > =============================================================================
> > > $ xmllint --noout --dtdvalid dia/diagram.dtd Diagram2.dia
> > > Diagram2.dia:2: element diagram: validity error : No declaration for
> > > attribute xmlns:dia of element diagram
> > > =============================================================================
> > > 
> > > Thanks for considering.
> > 
> > Quoting Daniel Veillard in 
> > http://mail.gnome.org/archives/xml/2004-March/msg00088.html:
> > 
> >  > DTD don't know about namespace, all namespace declaration are an
> >  > attribute and must be declared as such. This is not a bug, this is
> >  > conformance to specs.
> 
> Thanks for the hint.
> 
> What do think should be done about this (particular dia issue)? Do we
> just have to accept this kind of error in cases where namespaces are
> declared and the document is validated against a DTD (that doesn't care
> about namespaces)?

  The DTD do care about namespaces ... as attributes.
The DTD should be extended to allow for xmlns:dia on that element
(and probably most top level elements too).

Daniel

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