[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML Schema to relaxNG xslt


nillable
Hi Jeni,

>>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.
>
Yes, it does seems that the example is a valid restriction with regards 
to the nillable restriction so I guess this must be a bug in SQC because 
I can't see anything else that looks wrong.

Thanks for the pointer,
/Eddie

>                 
>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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.