|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Enlightenment via avoiding the T-word
From: "Nicolas LEHUEN" <nicolas.lehuen@u...> > Well I wouldn't be surprised that by adhering to the "all-global" policy, we > would soon find our namespaces too small... Let's consider this (somewhat > corny) "purchase" sample with local elements : > > <purchase xmlns="http://foobar/purchase"> > <customer> > <name>Nicolas</name> > <address>Paris, France</address> > </customer> > <delivery> > <mode>UPS</mode> > <address>Somewhere else</address> > </delivery> > <lines> > <line> > <!-- duh, will this wake up Echelon :) ? --> > <product> > <name>ACME Explosives</name> > <price currency="dollar">2000</price> > </product> > <quantity>200</quantity> > </line> > </lines> > </purchase> Sorry, where are the local types in this? You need to provide a schema or some clearer indication, otherwise I cannot follow the example. But it doesn't seem very convincing, from what I can follow: to say that having "mode" and "mode" with different meanings is preferable to having "mode" and "deliveryMode" is baffling. [Of course context will be useful for figuring out the meaning of an element when you first come to it; but if the meaning is different depending on each context (without warning) there is no way to synthesize the meaning from the multiple contexts.] On the concrete point of not wanting to use different namespaces because it complicates things, namespaces are the W3C technology for preventing name clashes and allowing modularization. They are the appropriate thing to use, if it is impossible to figure out alternative names. If you don't want to use multiple namespaces, why even use one? If your tools don't handle schemas with multiple namespaces well, get better tools, don't foist PSVI on the rest of us :-) > Problem is, the only way to have both global > element names only AND achieve modularity and extensibility is to > extensively use namespaces, Yes, if you want to reuse local names, you need as many namespaces as you have re-uses. That's the way it should be: no local names, no local types. If different columns in tables in DBMS have the same name, it is a mapping issue not something that should be needed by an XML schema language. And if it makes auto-generated Java more complicated, boo hoo. Cheers Rick Jelliffe
|
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
|
|||||||||

Cart








