[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Modules (was Re: namespaces )

  • From: Peter Murray-Rust <peter@u...>
  • To: xml-dev@i...
  • Date: Wed, 07 Jan 1998 09:03:39

Re: Modules (was Re: namespaces )
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@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.