Modules (was Re: namespaces )

Peter Murray-Rust peter at
Wed Jan 7 15:31:55 GMT 1998

At 17:05 07/01/98 +1100, Rick Jelliffe wrote:

>You may also be interested in the "Module" proposals, which were suggested
>inclusion into SGML. The idea started in Japan and has floated around getting
>firmer and simpler over the last year of XML discussions.
>The idea is simply to use any parameter entity name as a module prefix.
>So you could have, for example (though presumably it would use external
>parameter entities, not internal like in this example)
><!DOCTYPE y [ 
>	<!ENTITY % one " 
>	">
>	<!ENTITY % two " 
>		<!ELEMENT x ( #PCDATA | y )* >
>		%one;
>	">
>	%one;
>	%two;
>	<x>This is the element type declared in PE "one", as expected.</x>
> 	<one::x>This is also the element type declared in PE "one".</one::x>
> 	<two::x>This is the element type declared in PE "two".<y/></two::x>
>	<two::one::x>This is the element type declared in "one".</two::one::x>

[Please shoot this down if I have missed something...]

I think that newcomers to XML may read more magic processing into this than
exists. In the example given, an XML parser will see TWO declared
elementTypes (x and y). There is no declaration of one::x, two::x,
two::one::x. Indeed if the document were given to a validating parser this
would presumably report that "one::x has not been declared".

An XML parser on seeing <one::x> simply sees it as a 6 character
elementType. It has no mechanism for relating it to <x>. So IMO the second
sentence is not correct, *for the XML parser* - they are two different
beasts. Note in particular that XML does not allow substitution within the
start tag in the document.

Unless the XML parsers passes the PE information to the application, the
app has no way of knowing that <x> and <one::x> are semantically linked. A
common mechanism for this mapping - architectural forms (AFs) - is not
currently part of the XML or X*L specs.

If I have this right, it's important to realise that parsers have nothing
to do with namespaces, and that any namespace handling is application
dependent. If the WG or others come up with namespace proposals, I would
expect them to be implemented elsewhere than the parser.


Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS, Virtual Hyperglossary

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list