Commit 341ab670 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-10-22 15:35:46 by szach] Moved Schema regtests in tests/schema/ subdir

Original author: szach
Date: 2003-10-22 15:36:06+00:00
parent 8692ec96
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified" xml:lang="EN">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>A component of the XML Schema type library:
for vectors and arrays.</p>
<p>This is a very preliminary draft intended more to
indicate the direction in which the editors envisage
the type library evolving than anything else. Please
send suggestions for improvements to
www-xml-schema-comments@w3.org.</p>
<p>This version of this component has no target namespace:
it is suitable for including into any schema document
and will acquire the target namespace, if any, of the
including document.
A version in the type library namespace
(http://www.w3.org/2001/03/XMLSchema/TypeLibrary)
can be found at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-array.xsd
</p>
<p>$Id: TypeLibrary-nn-array.xsd,v 1.1 2003/10/22 15:35:46 szach Exp $</p>
<p>
In keeping with the XML Schema WG's standard versioning
policy, the schema document at this location, i.e.
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-array.xsd, may change
in the future, in order to remain compatible with the latest
version of XML Schema itself.</p>
<p>
Stable versions will be preserved in date space for the month
appropriate to the version of XML Schema they require. The current
set of stable versions is:
http://www.w3.org/2001/03/TypeLibrary-nn-array.xsd, etc. PR of 20010316
http://www.w3.org/2001/05/TypeLibrary-nn-array.xsd, etc. REC of 20010502
</p>
<p>
In other words, if the XML Schema namespace changes, the version
of this document at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-array.xsd will change
accordingly; the stable versions listed above will not change.
</p>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>The setting above of elementFormDefault='qualified' is
tentative: feedback welcome.</p>
</xs:documentation>
</xs:annotation>
<xs:complexType name="vector" abstract="true" mixed="true">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Allows values either in value attribute or content or
&lt;e&gt; daughters. Must be restricted
before use.</p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
</xs:sequence>
<xs:attribute name="vForm" type="vFormType"/>
<xs:attribute name="n" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Only advisory until we get co-constraints</p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="values" type="valuesType"/>
</xs:complexType>
<xs:simpleType name="vFormType">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Intended to be fixed down to one.</p>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:enumeration value="attribute"/>
<xs:enumeration value="content"/>
<xs:enumeration value="elements"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="valuesType">
<xs:list itemType="xs:anySimpleType"/>
</xs:simpleType>
<xs:complexType name="vectorAttrVals">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>This is intended to be restricted,
but at the moment we don't allow restrictions of list by means of restrictions
of itemTypes. . .
Note content must be empty.</p>
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:restriction base="vector">
<xs:attribute name="vForm" type="vFormType" use="optional" fixed="attribute"/>
<xs:attribute name="values" type="valuesType" use="required"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="vectorContentVals">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>This is intended to be restricted,
but at the moment we don't allow restrictions of list by means of restrictions
of itemTypes. . .</p>
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:restriction base="vector">
<xs:simpleType>
<xs:restriction base="valuesType"/>
</xs:simpleType>
<xs:attribute name="vForm" type="vFormType" use="optional" fixed="content"/>
<xs:attribute name="values" use="prohibited"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="vectorElementVals">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Element-based alternative, this one can usefully be used
as the base of a restricted type which restricts the type of &lt;e&gt;</p>
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:restriction base="vector">
<xs:sequence>
<xs:element name="e" minOccurs="0" maxOccurs="unbounded" type="xs:anySimpleType"/>
</xs:sequence>
<xs:attribute name="vForm" type="vFormType" use="optional" fixed="elements"/>
<xs:attribute name="values" use="prohibited"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="array" abstract="true">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Must be restricted before use, intention is that type of
&lt;r&gt; should be restricted to one of the three vector sub-types above.</p>
<p>2d array is a sequence of rows</p>
<p>n-dim array for n&gt;2 is a sequence of (n-1)-dim arrays</p>
</xs:documentation>
</xs:annotation>
<xs:choice>
<xs:element name="r" type="vector" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="p" type="array" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute name="dim" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Only advisory until we get co-constraints -- should we
require minInclusive=2?</p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="m" type="xs:nonNegativeInteger">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Only advisory until we get co-constraints</p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified" xml:lang="EN">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>A component of the XML Schema type library:
for a unified binary simple type.</p>
<p>This is a very preliminary draft intended more to
indicate the direction in which the editors envisage
the type library evolving than anything else. Please
send suggestions for improvements to
www-xml-schema-comments@w3.org.</p>
<p>This version of this component has no target namespace:
it is suitable for including into any schema document
and will acquire the target namespace, if any, of the
including document.
A version in the type library namespace
(http://www.w3.org/2001/03/XMLSchema/TypeLibrary)
can be found at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-binary.xsd
</p>
<p>$Id: TypeLibrary-nn-binary.xsd,v 1.1 2003/10/22 15:35:46 szach Exp $</p>
<p>
In keeping with the XML Schema WG's standard versioning
policy, the schema document at this location, i.e.
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-binary.xsd, may change
in the future, in order to remain compatible with the latest
version of XML Schema itself.</p>
<p>
Stable versions will be preserved in date space for the month
appropriate to the version of XML Schema they require. The current
set of stable versions is:
http://www.w3.org/2001/03/TypeLibrary-nn-binary.xsd, etc. PR of 20010316
http://www.w3.org/2001/05/TypeLibrary-nn-binary.xsd, etc. REC of 20010502
</p>
<p>
In other words, if the XML Schema namespace changes, the version
of this document at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-binary.xsd will change
accordingly; the stable versions listed above will not change.
</p>
</xs:documentation>
</xs:annotation>
<xs:simpleType name="binary">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">This type is intended
for use in schemas which wish to leave the choice of binary encoding to
instances. Instances _must_ specify xsi:type="xs:hexBinary" or
xsi:type="xs:base64Binary" to make sensible use of this type, as the first,
catchall type will otherwise be assigned.</xs:documentation>
</xs:annotation>
<xs:union memberTypes="error-signal-binary xs:hexBinary xs:base64Binary"/>
</xs:simpleType>
<xs:simpleType name="error-signal-binary">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">The appearance of
this type in the PSVI indicates that an instance of an item of type binary did
_not_ have an xsi:type specifying one of xs:hexBinary or xs:base64Binary. It
should not be used for any other purpose.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified" xml:lang="EN">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>A component of the XML Schema type library:
for linked lists.</p>
<p>This is a very preliminary draft intended more to
indicate the direction in which the editors envisage
the type library evolving than anything else. Please
send suggestions for improvements to
www-xml-schema-comments@w3.org.</p>
<p>This version of this component has no target namespace:
it is suitable for including into any schema document
and will acquire the target namespace, if any, of the
including document.
A version in the type library namespace
(http://www.w3.org/2001/03/XMLSchema/TypeLibrary)
can be found at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-list.xsd
</p>
<p>$Id: TypeLibrary-nn-list.xsd,v 1.1 2003/10/22 15:35:46 szach Exp $</p>
<p>
In keeping with the XML Schema WG's standard versioning
policy, the schema document at this location, i.e.
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-list.xsd, may change
in the future, in order to remain compatible with the latest
version of XML Schema itself.</p>
<p>
Stable versions will be preserved in date space for the month
appropriate to the version of XML Schema they require. The current
set of stable versions is:
http://www.w3.org/2001/03/TypeLibrary-nn-list.xsd, etc. PR of 20010316
http://www.w3.org/2001/05/TypeLibrary-nn-list.xsd, etc. REC of 20010502
</p>
<p>
In other words, if the XML Schema namespace changes, the version
of this document at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-list.xsd will change
accordingly; the stable versions listed above will not change.
</p>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>The setting above of elementFormDefault="qualified" is
tentative: feedback welcome.</p>
</xs:documentation>
</xs:annotation>
<xs:complexType name="LinkedList1">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>
This first approach simple omits the &lt;next&gt; element from the
last item in a list.
Note that in both this and the next case the type of the data
element is unconstrained.
</p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="data"/>
<xs:element name="next" type="LinkedList1" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LinkedList2">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>
This second approach uses a 'nil' &lt;next&gt; element in the last
item of a list.
</p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="data"/>
<xs:element name="next" type="LinkedList2" nillable="true"/>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>
Note that if provision needs to be made to allow an element declared
to be of type LinkedList1 or LinkedList2 to be empty, this can be
done by declaring it to be nillable. This suggests that LinkedList2 is
perhaps to be preferred.
</p>
</xs:documentation>
</xs:annotation>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified" xml:lang="EN">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>A component of the XML Schema type library:
for mathematics.</p>
<p>This is a very preliminary draft intended more to
indicate the direction in which the editors envisage
the type library evolving than anything else. Please
send suggestions for improvements to
www-xml-schema-comments@w3.org.</p>
<p>This version of this component has no target namespace:
it is suitable for including into any schema document
and will acquire the target namespace, if any, of the
including document.
A version in the type library namespace
(http://www.w3.org/2001/03/XMLSchema/TypeLibrary)
can be found at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-math.xsd
</p>
<p>$Id: TypeLibrary-nn-math.xsd,v 1.1 2003/10/22 15:35:46 szach Exp $</p>
<p>
In keeping with the XML Schema WG's standard versioning
policy, the schema document at this location, i.e.
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-math.xsd, may change
in the future, in order to remain compatible with the latest
version of XML Schema itself.</p>
<p>
Stable versions will be preserved in date space for the month
appropriate to the version of XML Schema they require. The current
set of stable versions is:
http://www.w3.org/2001/03/TypeLibrary-nn-math.xsd, etc. PR of 20010316
http://www.w3.org/2001/05/TypeLibrary-nn-math.xsd, etc. REC of 20010502
</p>
<p>
In other words, if the XML Schema namespace changes, the version
of this document at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-math.xsd will change
accordingly; the stable versions listed above will not change.
</p>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>The setting above of elementFormDefault='qualified' is
tentative: feedback welcome.</p>
</xs:documentation>
</xs:annotation>
<xs:complexType name="complexNumber">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>This immediately raises a question of style for this whole
effort: do we need locally-renamed types for the component elements, as here,
or is direct reference to the XML Schema builtins sufficient?</p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="real" type="realPart"/>
<xs:element name="imaginery" type="imagineryPart"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="realPart">
<xs:restriction base="xs:decimal"/>
</xs:simpleType>
<xs:simpleType name="imagineryPart">
<xs:restriction base="xs:decimal"/>
</xs:simpleType>
<xs:complexType name="rationalNumber">
<xs:sequence>
<xs:element name="numerator" type="numeratorPart"/>
<xs:element name="denominator" type="denominatorPart"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="numeratorPart">
<xs:restriction base="xs:integer"/>
</xs:simpleType>
<xs:simpleType name="denominatorPart">
<xs:restriction base="xs:integer"/>
</xs:simpleType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="qualified" xml:lang="EN">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>A component of the XML Schema type library:
for measured, dimensioned quantities.</p>
<p>This is a very preliminary draft intended more to
indicate the direction in which the editors envisage
the type library evolving than anything else. Please
send suggestions for improvements to
www-xml-schema-comments@w3.org.</p>
<p>This version of this component has no target namespace:
it is suitable for including into any schema document
and will acquire the target namespace, if any, of the
including document.
A version in the type library namespace
(http://www.w3.org/2001/03/XMLSchema/TypeLibrary)
can be found at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-quantity.xsd
</p>
<p>$Id: TypeLibrary-nn-quantity.xsd,v 1.1 2003/10/22 15:35:47 szach Exp $</p>
<p>
In keeping with the XML Schema WG's standard versioning
policy, the schema document at this location, i.e.
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-quantity.xsd, may change
in the future, in order to remain compatible with the latest
version of XML Schema itself.</p>
<p>
Stable versions will be preserved in date space for the month
appropriate to the version of XML Schema they require. The current
set of stable versions is:
http://www.w3.org/2001/03/TypeLibrary-nn-quantity.xsd, etc. PR of 20010316
http://www.w3.org/2001/05/TypeLibrary-nn-quantity.xsd, etc. REC of 20010502
</p>
<p>
In other words, if the XML Schema namespace changes, the version
of this document at
http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-quantity.xsd will change
accordingly; the stable versions listed above will not change.
</p>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>The setting above of elementFormDefault='qualified' is
tentative: feedback welcome.</p>
</xs:documentation>
</xs:annotation>
<xs:complexType name="quantity" abstract="true" mixed="true">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Allows value either in value attribute or content. Must
be restricted before use.</p>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
</xs:sequence>
<xs:attribute name="qForm" type="qFormType"/>
<xs:attribute name="dimension" type="xs:nonNegativeInteger" use="optional" default="1">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>A power for the units, e.g. 3 with unit='m' for cubic meters.</p>
<p>0 is OK, hence nonNeg as opposed to pos, but note
that unit is irrelevant for the dim=0 case.</p>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="unit">
<xs:annotation>
<xs:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>Will be constrained by derived types.</p>
</xs:documentation>
</xs:annotation>