[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Global/Local attributes
From: "Simon St.Laurent" <simonstl@s...> > > At 09:51 PM 8/1/2002 -0400, Benderjgxd@a... wrote: > >In a message dated 8/1/2002 8:36:12 PM Central Daylight Time, > >dareo@m... writes: > > > > > >>What is broken is the existence of a default namespace. Further mangling > >>Namespaces in XML to accomodate this mistake is unwise and borders on > >>foolishness. > > > > > >I disagree. What is broken is the possibility of local naming, where any > >namespaces are used. Or rather, what XML Schema seems to call unqualified > >names. > > That cuts even closer than Dare's original posting - I'd considered the > setting of the default namespace to "" when I read his. > > Mixing qualified and unqualified seems to be a more fundamental problem > than whether or not we slap prefixes on things. So are you saying that if a document uses namespaces, everything in the document should be qualified (regardless of the prefix issue)? It seems to me that Dare's solution would mean that implicitly. The following XML is fully qualified: <elem1 xmlns:x="http://example.com/"> <x:elem2 x:attr1="" attr1="" /> </elem1> Obviously, "x:elem2" and "x:attr1" are qualified. But "elem1" and "attr1" are qualified at this point as well. They belong to the "document's namespace" (goes back the the "local" v. "global" thing I was saying). The fact that nothing in the above XML is ambiguous means to me that everything is qualified (regardless of whether it has a "namespace prefix" attached to it). The problem with default namespaces is that ambiquity creeps in when you also want to use elements/attributes that belong to the document's namespace. You have to add rules like "attributes are not in the default namespace" and "if you encounter an xmlns='', this undoes the default namespace so that you can have access to the document namespace elements". And each time we turn around, throw in another caveat to solve some other discrepancy in the default namespace concept. By taking out the default namespace, everything is simplified (and don't we all love simplification) and we end up with "guaranteed" fully qualified documents at the same time. --- Seairth Jacobs seairth@s...
|
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
|