Dick Deneer <[EMAIL PROTECTED]> wrote on 01/04/2007 
05:29:29 PM:

> I am using the DOMNormalizer to validate a xsd against the 
> XMLSchema.xsd.
> The XMLSchema.xsd has a default value for the nillable attribute 
> which is added by the DOMNormalizer:
> 
> <xs:complexType abstract="true" mixed="false" name="element">
>          <xs:annotation>
>              <xs:documentation>
>     The element element can be used either
>     at the top level to define an element-type binding globally,
>     or within a content model to either reference a globally-defined
>     element or type or declare an element-type binding locally.
>     The ref form is not allowed at the top level.</xs:documentation>
>          </xs:annotation>
>          <xs:complexContent>
>              <xs:extension base="xs:annotated">
>                   .......
>                  <xs:attribute name="nillable" default="false" 
> type="xs:boolean" use="optional"/>
>                   ......
>              </xs:extension>
>          </xs:complexContent>
>      </xs:complexType>
> 
> 
> Afterwards I validate the dom with the GrammarParser.
> Now I get the following error:
> s4s-att-not-allowed: Attribute 'nillable' cannot appear in element 
> 'element'
>
> I solved this issue by removing all the default values in the 
> XMLSchema.xsd.
> But still it is a strange incompatibility.

If the 'ref' attribute [1] is present, the 'nillable' attribute isn't 
allowed. This cannot be expressed in the schema for schemas 
(XMLSchema.xsd) because XML Schema 1.0 does not support co-constraints. 
Also, there's no way to say in schema that an attribute only has a default 
if some other attribute is absent.

> Regards
> Dick Deneer
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

[1] http://www.w3.org/TR/xmlschema-1/#d0e4233

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to