|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces,W3C XML Schema (was Re: ANN: SAXFiltersforNamespaceProces
"David E. Cleary" wrote: > > > I don't recall XML Schema permitting multiple redefinitions of the same > > element type, but I may well be missing something. Seems like obviously > > dangerous practice, in any event. > > It doesn't. We are not talking redefinitions of types. It is no different > that having a class foo with a private variable called x of type int and a > class bar with a private variable called x of type double. Foo can't see > bar's x and vice-versa. Also, removing x from it's context probably isn't > usefull. It most certainly is useful. In relational databases, it's called a join. You grab some elements from one object (row), some elements from another object (row), and create a new object (row). If columns in the two different tables have the same name, you have to worry about naming issues; otherwise you don't. In XML terms, this means you cut and paste children of two different elements into a third element. If you namespace-qualify your elements and don't use local elements, then this is simply cut and paste. If you use unqualified elements or locally defined elements, then: a) the resulting document is not as easily interpretable since you've lost context, and b) you're no longer guaranteed the ability to simply cut and paste, as you now have to worry about name collisions, the problem that namespaces were introduced to solve and that XML Schemas introduces two ways to circumvent: unqualified child element names and local element names. -- Ron
|
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








