FW: XML Schema compliance

Just forwarding a message that I mistakenly sent privately only to
Jenni.

> -----Original Message-----
> From: Savas Parastatidis
> Sent: Tuesday, July 08, 2003 9:08 AM
> To: 'Jeni Tennison'
> Subject: RE: XML Schema compliance
> 
> Jeni,
> 
> I still have concerns. Sorry :-(
> >
> > I think that you are mixing up two infosets that are completely
> > separate:
> >
> >   (1) the infoset from the Schema-for-Schema, which a validator
might
> >       use to check the XML representation of your schema
> >
> >   (2) the infoset generated from your schema
> >
> 
> I don't think I am mixing the two.
> 
> To illustrate my concern, can you, please, run a modified version of
your
> example through your XML Schema validator? I used XSV and it works but
I
> think it shouldn't.
> 
> This is the modified version. I just changed the "schemaLocation" to
point
> to a file locally. Can you use the file attached? It is the
Schema-for-
> Schemas with a slightly modified xs:element complexType (the "type"
> attribute has been commented out).
> 
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>            elementFormDefault="qualified">
> 
> <xs:import namespace="http://www.w3.org/2001/XMLSchema"
>            schemaLocation="SfS.xsd" />
> 
> <xs:complexType name="foo">
>   <xs:complexContent>
>     <xs:extension base="xs:element">
>       <xs:attribute name="bar" type="xs:integer" />
>     </xs:extension>
>   </xs:complexContent>
> </xs:complexType>
> 
> <xs:element name="foo" type="foo" />
> 
> </xs:schema>
> 
> 
> Now, if your schema validator says that this is valid, I would argue
that
> it has ignored the xs:element element definition found in the SfS.xsd
but
> has not ignored the xs:element type declaration. Why?
> 
> The type of the xs:element element definition is topLevelElement
> complexType, which is a restriction of the abstract xs:element
complexType
> (the one that does not have a "type" attribute).
> 
> If the validator says that this is invalid, then that means that is
has
> replaced everything that it knows about the XML Schema structures
because
> of the import statement. Doesn't that potentially break all the XML
Schema
> validation rules?
> 
> Am I totally wrong?
> 
> .savas.

Received on Tuesday, 8 July 2003 04:10:47 UTC