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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Modules (was Re: namespaces )

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 07 Jan 1998 09:03:39

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

>You may also be interested in the "Module" proposals, which were suggested
for
>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 " 
>		<!ELEMENT x (#PCDATA)>
>	">
>	<!ENTITY % two " 
>		<!ELEMENT x ( #PCDATA | y )* >
>		%one;
>	">
>	%one;
>	%two;
>]>
><y>
>	<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>
></y>

[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.

	P.


Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg

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