OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] XSD substitution groups, subtypes, nillable .. thewhole

[ Lists Home | Date Index | Thread Index ]

Henry S. Thompson wrote:

>Hash: SHA1
>Thanks for clarifying -- before going further in constructing a reply,
>we need to fix something:
>><complexType name="a">
>>  <!--- some model --->
>><complexType name="b">
>>  <extension base="a">
>>     <!--- some model -->
>>  </extension>
>><element name="x" type="a" substitutionGroup="y"/>
>><element name="y" type="b"/>
>is backwards, i.e. not allowed as written.  For x to be in the
>substitution group of y, x's type must be or be derived from y's type,
>but in this case it's the other way around.
>Does this invalidate the rest of your questions about this example, or
>should we just reverse 'a' and 'b' in this example, or . . .?
The other examples do not have this feature. At least, they were not 
intended to, and they are not supposed to depend on anything defined in 
that example (scenario 2)

The question in scenario 2 can be reformulated to:

Given the declarations, what is the case?

- The schema is plain "statically" invalid, and should be rejected as such
- The schema is a valid XML Schema, but no instance document that 
substitutes an y-element by an a-typed x-element will validate
- The schema is a valid XML Schema, but no instance document that 
substitutes an y-element by any x element will validate
- The schema will validate a document where an a-typed x element appears 
in place of an y element
- Something else?

I have a hard time reading the intended meaning out of the spec, except 
that I have a fairly good idea that the 4th option is not the right one :)

If this particular example is too much trouble, we can leave it for 
later, and take the others first.

Meanwhile, I begin to realise that I have probably misunderstood 
something about the final / disallowed substitutions is related to
- type substitutions, not only substitution groups
- substitution by substitution group members can be switched on or off 
entirely with final / disallowed substitutions

Substitution group exclusions (aka block) limits the types of 
substutiteable elements (but it does not restrict anything that does not 
have to do with substitution groups)

--- anyway I think I know of a way to squeeze that semantics into my 
"many constructs, single declarations --> few constructs, many 
declarations" simplification.

Thanks again



News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS