[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespace: what's the correct usage?
----- 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|