Re:Namespaces

The namespace issues are very close to those addressed
in various ways by various programming languages.
Syntax issues aside and very much thinking out loud
the following spring to mind (with apologies
to Python and Modula 2 at the very least):-

1)
==
<!-- XML Doc "Bar.xml"
imports element type declarations A,B,C from an
external DTD "foo" The element type declarations are then
part of the base DTD's namespace -->
<? from DTD foo import A,B,C>
<A>I am an A from the DTD foo

2)
==
<!-- XML Doc "Baz.xml"
imports all element type declarations from an
external DTD "foo". The element type declarations do not
become part of the base DTD's namespace but are available
via name space qualification -->
<? import DTD foo>
<A>I am not A in the foo DTD
<foo::A>I am an A from the DTD foo

3)
<!-- XML dtd foo.dtd
Makes certain element type declarations "public"
-->
<!element A...>
<? exports A,B,C>

This sort of thing could help sort out the name space issues but
does not help in sub-classing element types. For that we will need
soom OO stuff in the Prolog at least. I cannot dream up any way
to do it without new syntax for element type declarations though.

<warning type = "outrageous leap into the unknown">

I wonder if having access to grove like properties of element
type declarations would be a useful thing for subclassing DTDs?

<? from foo import a>
<!element VariationOnA (a::ContentModel | b | c)>

The only way this sort of thing can be done today is via voodoo
paramater entities.

</warning>


Sean

Sean Mc Grath

sean@digitome.com
Digitome Electronic Publishing
http://www.digitome.com

Received on Thursday, 22 May 1997 04:09:46 UTC