http://www.w3.org/2001/tag/doc/versioning

A propos the suggestions for use of xsd:any with ##other namespace:

"Allow Extensions in Other Namespace rule: The extensibility point SHOULD at
least allow for extension in other namespaces.

The rule for allowing extensibility:

Good Practice
Full Extensibility rule: All XML Elements SHOULD allow for element
extensibility after element definitions, and allow any attributes."

I would argue against this from experience with XML Schema usage for large
grammars.

Common practice, and generally defined Good Practice is to split the
component semantics of ones grammar into seperate namespaces (for usage and
maintainability of XML Schema [in my opinion this good practice leads to
difficulty of maintainability and aesthetic ugliness of XML dialects]). 

So if I have an auto grammar I have auto in the http://www.example.org/auto
namespace and information about electronics in the auto under
http://www.example.org/auto/electronics

In some cases our XML structure may allow auto and electronics elements to be
referred to under the same auto element. When this happens the inclusion of
an xsd:any other namespace ##other under definitions for one or the other
namespace would be non-deterministic unless the cardinality of the element
directly preceding the extending elements was always set to one.

It has been my experience, not just personal but observing others, that
people tend to run into problems when one allows any at the same level in the
tree as other elements. I have observed this problem in fairly large XML
projects, including EBXML Messaging and I have to observe using this way of
extending things (with XML Schema) is asking for trouble.

As for the use of any attributes on an element, a grammar may specify
attributes of particular meaning that applied to an certain elements would be
nonsensical, thus I suppose it should allow any namespace qualified
attributes - and that the main grammar should be attributeFormDefault
unqualified.

I am sure that there are people who can make these things work very easily,
but the Good practice in a technology is not based on how easy it is for the
best practicioners of the technology to make it work but also how
maintainable it makes the technology for users that can be classed not as
expert but are at least competent. Again, from my experience and observations
even quite competent users of XML Schemas will run into problems with
non-determinism with any allowed at the same level as specified elements. 

MVH
Bryan Rasmussen

Received on Thursday, 27 July 2006 09:14:44 UTC