Re: [xml] Incorrect processing of xmlns declarations?



On Fri, 5 Mar 2004 18:13:44 -0500
Daniel Veillard <veillard redhat com> wrote:

On Fri, Mar 05, 2004 at 10:56:15PM +0000, Matthew Burgess wrote:
--- ns.xml ---

<!DOCTYPE para PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN" 
  "http://www.docbook.org/xml/4.3CR3/docbookx.dtd";>
<para xmlns:xi="http://www.w3.org/2003/XInclude";>Test</para>

--- ns.xml ---

To me this should just be declaring an XML Namespace.  However,
xmllint seems to think it's an attribute:

---
matthew localhost $ xmllint --valid ns.xml
ns.xml:3: element para: validity error : No declaration for
attribute xmlns:xi of element para Test
---

  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.

So am I correct in implying it's a bug in the docbook-DTD then, i.e. it
doesn't allow the declaration of namespaces.  Or is there something
*I* should be doing to get it to work.  For this to work at all on the
DTD level then there'd have to be scope to be able to state that
any attribute found matching "xmlns:*" is to be acceptable, as the
DTD authors can't possibly know what I might want to call the
namespace.

Sorry for requesting so much hand-holding, I'm a complete newbie to
namespace issues (as is probably immediately apparent).

Best regards,

Matt.



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