Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Attribute declaration when use="prohibited" >Thread Next - Re: block attribute and substitution groups block attribute and substitution groupsTo: xmlschema-dev@--.--- Date: 1/7/2009 1:25:00 PM
Hej,
today I have a question about the block attribute in conjunction with
substitution groups.
Let's assume the following schema
==========================
================
<xsd:schema
xmlns="ElemDecl/disallowedSubst"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="ElemDecl/disallowedSubst"
elementFormDefault="qualified"
>
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Head" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Head" type="Type"/>
<xsd:complexType name="Type" block="restriction"/>
<xsd:complexType name="derivedFromType">
<xsd:complexContent>
<xsd:restriction base="Type"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="Member1" type="derivedFromType"
substitutionGroup="Head"/>
</xsd:schema>
==========================
=================
according to the test suite and some schema validators it is correct.
However I stumble about http://www.w3.org/TR/xmlschema11-1/#e-props-correct=
4)
that defines
For each member M of E.{substitution group affiliations}, E.{type definiti=
on}
is =B7validly substitutable=B7 for M.{type definition}, subject to the blo=
cking
keywords in M.{substitution group exclusions}.
So when checking element Member1, derivedFromType must be validly
substitutable for Type, subject to the blocking keywords (empty set in this=
case)
When checking =B7validly substitutable=B7, the first case (both are complex=
types)
is used, which means:
derivedFromType is validly derived from Type subject to the blocking keywo=
rds
in the union of {empty set} and {restriction}, as defined in Type Derivati=
on
OK (Complex) (=A73.4.6.5)
Now when testing Type Derivation Ok (Complex) all rules from
http://www.w3.org/TR/xmlschema11-1/#cos-ct-derived-ok must be true, however
the first fails, as derivedFromType and Type are not the same type
but 'restriction' _is_ part of the constraint set.
Where is my error in reasoning? Any help is appreciated.
Ciao,
Tobias
From sandygao@c... Wed Jan 07 14:36:54 2009
Received: from maggie.w3.org ([193.51.208.68])
by frink.w3.org wi | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
