W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

Re: Schema Test Collection Summary / Question

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 11 Sep 2002 12:06:24 +0100
Message-ID: <90395170054.20020911120624@jenitennison.com>
To: xmlschema-dev@w3.org, Stefan Wachter <Stefan.Wachter@gmx.de>
CC: ht@cogsci.ed.ac.uk

Hi Stefan,

> I worked through the schema test collection with the following
> result. Can anyone confirm my result?
>
> msxsdtest:
>   - attP009: Required attribute must not be missing - even if there
> is a fixed value. (There was already a lot of discusstion about this
> topic in the xmlschema-dev list.)

Agreed.

>   - attgA008, stA003: ID attributes have not to be unique with
> respect to imported or included schema documents.

Agreed.

> suntest:
>   - idc001.nogen.xsd, idc005.nogen.xsd, idc006.nogen.xsd: the default
> namespace has no effect inside XPaths.

Agreed.

>   - xsd001.xsd: New attributes must not be introduced in restrictions.

Agreed.

>   - xsd003b.xsd: Unknown simple type "number".

Agreed. (It's probably a hangover from when xs:decimal was xsd:number
in the Proposed Recommendation dated 16 March 2001.)

>   - xsd022.xsd: Missing base attribute in simple content restriction.
>
> I am not sure about this last test case. Definition is as follows:
>
> <xsd:complexType>
>         <xsd:simpleContent>
>                 <xsd:restriction>
>                         <xsd:simpleType>
>                                 <xsd:list itemType="abc"/>
>                         </xsd:simpleType>
>                 </xsd:restriction>
>         </xsd:simpleContent>
> </xsd:complexType>
>
> This looks quite reasonable, but I think the base attribute is
> required here.

I agree. The base attribute is shown as required on the definition of
the xs:restriction element within the xs:simpleContent element both
within the Rec and in the schema for schema. A xs:restriction within a
xs:simpleContent element is of type xs:simpleRestrictionType:

<xs:element name="simpleContent" id="simpleContent">
 <xs:annotation>
  <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
 </xs:annotation>
 <xs:complexType>
  <xs:complexContent>
   <xs:extension base="xs:annotated">
    <xs:choice>
     <xs:element name="restriction" type="xs:simpleRestrictionType"/>
     <xs:element name="extension" type="xs:simpleExtensionType"/>
    </xs:choice>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
</xs:element>

which is defined as:

<xs:complexType name="simpleRestrictionType" mixed="false">
 <xs:complexContent>
  <xs:restriction base="xs:restrictionType">
   <xs:sequence>
    <xs:element ref="xs:annotation" minOccurs="0" />
    <xs:choice minOccurs="0">
     <xs:annotation>
      <xs:documentation>This choice is added simply to make this a valid restriction per the REC</xs:documentation>
     </xs:annotation>
     <xs:group ref="xs:simpleRestrictionModel" />
    </xs:choice>
    <xs:group ref="xs:attrDecls" />
   </xs:sequence>
   <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:restriction>
 </xs:complexContent>
</xs:complexType>

and inherits the base attribute from the xs:restrictionType:

<xs:complexType name="restrictionType" mixed="false">
 <xs:complexContent>
  <xs:extension base="xs:annotated">
   <xs:sequence>
    <xs:choice minOccurs="0">
     <xs:group ref="xs:typeDefParticle" />
     <xs:group ref="xs:simpleRestrictionModel" />
    </xs:choice>
    <xs:group ref="xs:attrDecls" />
   </xs:sequence>
   <xs:attribute name="base" type="xs:QName" use="required" />
  </xs:extension>
 </xs:complexContent>
</xs:complexType>

The restriction would have to be from another complex type with simple
content. So I think that this complex type would probably be better
created by extending a simple type (a list type with an item type of
'abc') than via restriction.

> nisttest:
> - Many tests for the float and double types are incorrect because
> the assume a different scale/precision of floating point numbers
> then XML schema (or Java) does.

I don't know what this entails.

> - Many QName tests fail, because the prefixes are not registered
> with xmlns attributes.

Agreed.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 11 September 2002 07:06:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT