OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Namespaces: silly question

[ Lists Home | Date Index | Thread Index ]
  • From: Lars Marius Garshol <larsga@ifi.uio.no>
  • To: xml-dev@ic.ac.uk
  • Date: Fri, 07 Aug 1998 10:52:16 +0200

Here's a really stupid question that I haven't been able to figure out
the answer to:

Sral, the naive XML developer, is developing an XML application. He
writes a DTD that embeds John Cowans IBTWSH DTD in a certain place to
provide for documentation. The IBTWSH DTD at some point contains this

  <!ELEMENT P (%some-pe;)>

and Srals DTD contains:


So far, all is well. These documents are supposed to be processed in
part by software written for IBTWSH documents, so Sral adds to his DTD
the following declaration:

  <!ATTLIST IBTWSH-root-element 
            xmlns:IBTWSH "http://www.purl.org/foo" #FIXED>

so that all IBTWSH elements will use the IBTWSH namespace by default.

Then, somewhere in one of his documents, Sral writes:


This is where the problems begin. (Well, they really started above,
but it's easier to see here.) Srals validating parser can now do one
of three things if it supports namespaces:

  a) complain that the IBTWSH:P element has not been declared. (Which
     is literally true: it was declared as P.)
  b) complain that the http://www.purl.org/foo:P element has not been
  c) strip out the namespace prefix and have IBTWSH:P blithely collide
     with the Sral:P defined in Srals DTD.

In other words: as far as I can understand either DTDs must use the
full namespace names in all declarations, as in

  <!ELEMENT http://www.purl.org/foo:P ...>  

(which is truly unreadable, and also not well-formed) or there must be
some means by which a DTD can declare its namespace, which will of
course be difficult since one may want to mix namespaces.

I can't imagine that the XML WG has failed to think of this, so if
some kind soul could point out what I have failed to think of here I
would be most grateful. Thanks.

"These are, as I began, cumbersome ways / to kill a man. Simpler, direct, 
and much more neat / is to see that he is living somewhere in the middle /
of the twentieth century, and leave him there."     -- Edwin Brock

 http://www.stud.ifi.uio.no/~larsga/      http://birk105.studby.uio.no/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS