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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Modules (was Re: namespaces )

[ Lists Home | Date Index | Thread Index ]
  • From: "Rick Jelliffe" <ricko@allette.com.au>
  • To: "james anderson" <mecom-gmbh@mixx.de>, <xml-dev@ic.ac.uk>
  • Date: Wed, 7 Jan 1998 17:05:08 +1100


 
> From: james anderson <mecom-gmbh@mixx.de>

> i had found two proposals at the time i was implementing namespaces, the
> implementation is closest to the one which i can attribute only to "microsoft"
> (my copy has no authorship noted) and which dates from 21.10.97.
> we use the pi-form from the microsoft proposal to denote the creationof the
> specified package and to load the specified dtd into that package.

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>

These merely provide a directory system to resolve names, they
don't attempt to provide any schema solution (that is a separate
problem). Because parameter entities can contain other PEs,
the module prefixes can concatenate (e.g., two::one::x above).

(In the SGML proposals, there is actually a special keyword MODULE
put as part of the parameter entity declaration, to flag that the
PE is also a module, but this is not required.)

Rick Jelliffe



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