RE: [Bug report] XSV Restriction Error

> 
>  Base:
> 
> >           <xsd:any namespace="##any" processContents="strict"
> >                    minOccurs="0" maxOccurs="unbounded"/>
> 
>  Restriction:
> 
> >           <xsd:element name="element" type="xsd:token"/>
> 
> Not really a bug, but a feature -- because the base is strict, and
> there are no elt declarations in the schema, that wildcard accepts
> nothing.

I haven't seen that extensional interpretation of ##any used before.

What if there was a global declaration 

<xsd:element name="element" type="xsd:integer"/>

Would it be the case that the restriction is invalid because none of the
possible elements that ##any might match has a type that's compatible with
xsd:token?

Or is there a rule somewhere that the restriction can only be a reference to
a globally-declared element?

Saxon incidentally accepts the schema as supplied, although it also uses an
algorithm based on comparing the two FSA's to see if one subsumes the other.
However, it only checks the element name ("element") against the set of
namespaces permitted by the wildcard ("##any"), it doesn't expand the
wildcard into a finite set of permitted element names.

Michael Kay
http://www.saxonica.com/

Received on Tuesday, 19 April 2005 09:50:02 UTC