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

Re: Namespace: what's the correct usage?

  • From: Martin Gudgin <marting@d...>
  • To: Jonathan Borden <jborden@m...>,"Simon St.Laurent" <simonstl@s...>
  • Date: Sun, 20 May 2001 07:59:25 +0100

usage et al

----- Original Message -----
From: "Jonathan Borden" <jborden@m...>
To: "Martin Gudgin" <marting@d...>; "Simon St.Laurent"
<simonstl@s...>
Cc: <xml-dev@l...>
Sent: Sunday, May 20, 2001 12:09 AM
Subject: RE: Namespace: what's the correct usage?


> Martin Gudgin wrote:
> > From: "Simon St.Laurent" <simonstl@s...>
>
> >
> > >
> > > Unfortunately, I think the way you're going about using namespaces
makes
> > > a lot of potentially unfounded assumptions about how the document will
> > > be processed.  In an environment you completely control, that's fine,
> > > but if your documents ever leak out to the rest of the world, you may
> > > well find that no one else shares your assumptions and that therefore
> > > the document is interpreted quite differently.
> >
> > [MJG]
> > I think whichever way you use namespaces you are making assumptions
about
> > the people who will see and process your XML. People use local scoping
in
> > programming languages because it was recognised that putting everything
in
> > global variables was a bad idea. I suspect that over time a similar
> > observation may apply to XML.
>
> First a major purpose of namespaces is to prevent element name clashes, so
I
> don't see how you can equate local scoping in programming languages with
> local scoping of element declarations. Regardless, I think you are
> conflating "variables" with "elements" and
> "types" together. Scoping an element declaration to a type, is not the
same
> as scoping an element declaration to a parent element. Elements remain
first
> class entities in XML regardless. see the XML Schema Formal Description if
> this remains in doubt.

I agree that elements are first class citizens. I don't see how using local
scoping changes that. Please see my post to Simon[1]

>
> Secondly I'm not entirely (well... at all) happy with your use of the
> "urn:example.org.people" pseudo-URI reference as a namespace name. The
idea
> that you can stick a "urn:" before whatever string you like and call it a
> URI is wrong and far to common. There is a defined IETF mechanism for
> registering namespaces under the "urn" scheme and when "urn:"s are to be
> used, this really must be followed.

Sorry, a ref to the relevant IETF doc would be useful, I'm more than happy
to make sure that in future all my examples contain syntactically valid
URNs. In the absence of that document, would urn:example-org-people be any
better? If not I guess I'll go back to uuids ;-)

>
> Thirdly, though you are not by any means required, it would be _nice_ to
use
> a resolvable*** URI as a namespace name, one that might contain some
> documentation about what the "person" "family" and "given" elements mean
and
> how they are to be used. This is what I hope will come into standard
> practice over time.

I was just using the Java package name from an earlier example, that's all.
I agree it would be nice if namespace names were resolvable. Not everyone
takes that point of view, though...

>
> ***Note that Michael Mealing et al. are have done lots of work to provide
> resolution for "urn"s so these URIs really should be constructed in a
proper
> fashion.

Is this work web accessible so I can take a look at it?

Cheers

Gudge

[1] http://lists.xml.org/archives/xml-dev/200105/msg00627.html


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.