[
Lists Home |
Date Index |
Thread Index
]
Eddie Robertsson wrote:
> SQC complains about the above but it also gives the following error:
>
> TYPE REFINEMENT ERROR (content type incompatible with the content type
> of the basetype):
> In the definition of complexType DareObasanjo, elementOnly content model (
> <xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="1" minOccurs="1" name="numPosts"
> nillable="false" type="xs:integer"/>
> <xs:element maxOccurs="1" minOccurs="1" name="signature"
> nillable="false" type="xs:string"/>
> </xs:sequence>
> )
> is not a restriction of elementOnly content model (
> <xs:sequence maxOccurs="1" minOccurs="1">
> <xs:element maxOccurs="1" minOccurs="0" name="numPosts"
> type="xs:integer"/>
> <xs:element maxOccurs="1" minOccurs="1" name="signature"
> nillable="true" type="xs:string"/>
> </xs:sequence>
> ),
> the content type defined by the basetype.
>
> I'm not sure if this is indded an error that the others have missed or
> if SQC is incorrect but my guess is that the error relates to how
> nillable can be modified in a restriction. I can't find this in the spec
> so I'll leave it to others to decide if SQC is wrong and the others
> correct or vice versa.
I don't know what SQC is complaining about, but it shouldn't be the
value of nillable. Schema Component Constraint: Particle Restriction
OK (Elt:Elt -- NameAndTypeOK) states:
For an element declaration particle to be a ·valid restriction· of
another element declaration particle all of the following must be
true:
...
2 Either B's {nillable} is true or R's {nillable} is false.
...
http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK
In this case, B's {nillable} is true and R's {nillable} is false, so
it should be fine from what I can tell.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
|