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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Fw: Namespaces

[ Lists Home | Date Index | Thread Index ]
  • From: Mark Birbeck <Mark.Birbeck@iedigital.net>
  • To: 'Clark Evans' <clark.evans@manhattanproject.com>, XML Developers' List <xml-dev@ic.ac.uk>
  • Date: Wed, 3 Feb 1999 16:27:26 -0000

Clark - hope you don't mind but I'm copying this to the group because it
may be of interest.

Clark Evans wrote:
> Mark Birbeck wrote:
> > Using the expanded syntax from A.3 in the spec (sorry James,
> > yours is nice too), we get:
> 
> Could you translate into the syntax James put forth, I think
> it much more clearly illustrates what's going on and 
> thus better facilitates conversation. Having to mentally translate
> what you wrote caused me to get a headache.  *evil grin*
> 
> :) Clark
> 
Sorry about your head Clark, but you can't translate because they
express two different things. James's syntax allows us to see what's
going on in an XML document by spelling out the namespaces to which
elements and attributes belong. So (from my email):

	<xml xmlns:n1="http://www.w3c.org" />
	<n1:good a="1" />
	<n1:good n1:a="1" />
	<n1:better a="1" />
	<n1:better n1:a="1" />

becomes:

	<{http://www.w3c.org}good a="1" />
	<{http://www.w3c.org}good {http://www.w3c.org}a="1" />
	<{http://www.w3c.org}better a="1" />
	<{http://www.w3c.org}better {http://www.w3c.org}a="1" />

in James's syntax. However, I was expressing what position those
elements and attributes occupy in the XML namespace (again, from my
previous email):

> Our complete expanded list becomes:
>
>	<ExpEType name='good' ns="http://www.w3.org" />
>	<ExpEType name='better' ns="http://www.w3.org" />
>	<ExpAName name='a' eltype="good" elns="http://www.w3.org" />
>	<ExpAName name='a' eltype="better" elns="http://www.w3.org" />
>	<ExpAName name='a' ns="http://www.w3.org" />

Note that 'a' on 'good' has a unique entry, as does 'a' on 'better', but
in James's syntax we have 'a="1"' for both - i.e. no differentiation.

James's syntax is therefore a useful 'exploded XML' but has to be used
'in context' - because it is still expressing the original XML document.
But it does not tell us everything about the namespace (within the XML
namespace) that an element or attribute occupies. The expanded
attribute/element syntax loses information about the original XML
document, but *does* map the namespace structure.

As a shorthand in a previous email I used '^' between the various parts
that tell you where in the XML namespace structure an element or
attribute appears. So I could have expressed the above using:

	AETP^http://www.w3.org^good
	AETP^http://www.w3.org^better
	PETP^http://www.w3.org^good^a
	PETP^http://www.w3.org^better^a
	GAP^http://www.w3.org^a

where:

	AETP is the 'all element types' partition
	PETP is the 'per-element-type' partition
	GAP is the 'global attribute' partition

Note that we have four namespaces (i.e. sets) within the greater XML
namespace. These are:

	AETP
	PETP^http://www.w3.org^good
	PETP^http://www.w3.org^better
	GAP

Not sure if that helps your headache, but it *is* a more accurate
representation of what is happening!

Mark Birbeck
Managing Director
Intra Extra Digital Ltd.
39 Whitfield Street
London
W1P 5RE
w: http://www.iedigital.net/
t: 0171 681 4135
e: Mark.Birbeck@iedigital.net


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/ and on CD-ROM/ISBN 981-02-3594-1
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