[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Schemas: ref'ing versus in-lining
Curt Arnold wrote: > Having to detect when multiple declarations are exactly (or > sufficiently) identical seems to be unnecessary complexity. I don't think this is really so complex. Forgetting any impact of abstract elements: * a complex type declaration has its own symbol space for elements * an element declaration (in a complex type declaration) not only defines the existance of the element, it also binds the name to a type (directly or by reference) * an subsequent uses of the element must also bind the name to the same type (directly or by reference) A good question is whether a subsequent element can have a derived type of the first element's type? Henry? The reason why this is good is that *how* something is declared (where there are several alternative syntaxes) should not affect what is declared. Of course, there may be other considerations (implementation difficulties would be the most compelling) that could alter the tradeoffs, and the WG is very interested in being told them. RELAX takes, I think, a sugar-free approach of making you declare types before/separately to binding them to element names. But this results in very shallow trees and therefore more cross-referencing: it may be more difficult to read and unacceptable (remembering that RELAX does not have type-derivation so its schemas will tend to be smaller: XML Schemas schemas may allow much more detailed description of datatypes and consequently be larger, so reducing page-flipping may be good for humans at least). When the next draft comes out, I hope people will think about this to see if they would prefer RELAX-style or allow inline declarations of type as we currently have. I tend to think it is matter of taste with no clear reasons to favour one way or another (which is why implementation feedback is really important: concrete annecdotes are better than taste). 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
|