[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Schema to relaxNG xslt
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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|