On 16/10/2010 13:03, Costello, Roger L. wrote:
> Hi Folks,
>
> Suppose a team has this XML Schema design policy:
>
> No local element or attribute declarations
> are permitted. All elements and attributes
> must be globally declared.
>
> This policy strips the XML Schema language of a significant functionality. What are the consequences?
It would have the consequence that an element or attribute called say
"status" or "code" or "address" or "date" is subject to the same rules
regardless where it appears; you can't have context-dependent rules. Or
to put it another way, if the rules for validating the content of two
elements or attributes are different, then their names have to be different.
Which could become irritating if the rules differ only very slightly; or
if the rules were once the same, but you now want to change them.
In XSD 1.1 you could define the context-dependent rules using assertions
on the parent element.
Michael Kay
Saxonica