This question comes up a lot in schema design. I think WS-Policy has done the exact right thing. I proposed in Sep '06 that:
1) Use ##any for all extensibility where possible,
2) Else use ##other.
3) Where ##other conflicts with a particular element, remove the element from the content model.
The use of ##any is typically only allowed after mandatory elements and for attributes. But that case allows where the spec author could revise their specification and add names into their namespace without a namespace change. This style is described in the TAG Finding on XML Versioning as Versioning Strategy #2.5: all new components in new or existing namespace(s) for each compatible version.
I think this is the emerging default strategy for WS-* specs.
I happen to prefer a different style that allows much more use of ##any. WS-Policy could have used ##any for all extensibility IF it had adopted an extension element style (described in Versioning Strategy #3: all new components in existing namespace(s) for each compatible version), but most people are shying away from including markers in the document instance.
I think it's better in general than Versioning Strategy #2: all new components in new namespace(s) for each compatible version because that strategy generally doesn't allow compatible changes to be reflected in the Schema and doesn't give the language designer the most flexibility.
Leave a comment