Commit f512305a authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-06-27 08:02:52 by cvscast] zack: added some regression tests that should fail

Original author: cvscast
Date: 2003-06-27 08:02:52+00:00
parent 43dd7103
<?xml version="1.0"?>
<!DOCTYPE xsd:schema SYSTEM "XMLSchema.dtd" [
<!ENTITY % p 'xsd:'>
<!ENTITY % s ':xsd'>
]>
<!-- this should not be accepted: unions can't be used to embed lists inside
other lists -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="foo" type="fooT"/>
<xsd:simpleType name="bool_list">
<xsd:list itemType="xsd:boolean" />
</xsd:simpleType>
<xsd:simpleType name="day_list">
<xsd:list itemType="xsd:gDay" />
</xsd:simpleType>
<xsd:simpleType name="bool_list_or_day_list">
<xsd:union memberTypes="bool_list day_list" />
</xsd:simpleType>
<xsd:simpleType name="fooT">
<xsd:list itemType="bool_list_or_day_list" />
</xsd:simpleType>
</xsd:schema>
<?xml version="1.0"?>
<!DOCTYPE xsd:schema SYSTEM "XMLSchema.dtd" [
<!ENTITY % p 'xsd:'>
<!ENTITY % s ':xsd'>
]>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- should not be accepted: violates UPA -->
<xsd:element name="foo" type="fooT"/>
<xsd:complexType name="fooT">
<xsd:sequence>
<xsd:sequence minOccurs="1" maxOccurs="unbounded">
<xsd:element name="foo" type="xsd:string" />
</xsd:sequence>
<xsd:element name="foo" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<?xml version="1.0"?>
<!DOCTYPE xsd:schema SYSTEM "XMLSchema.dtd" [
<!ENTITY % p 'xsd:'>
<!ENTITY % s ':xsd'>
]>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="foo" type="fooT"/>
<xsd:simpleType name="fooT">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d+"/>
<xsd:whiteSpace value="collapse" />
<!-- wont work without the above facet because the default whiteSpace facet
for string derived types is preserve -->
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
<?xml version="1.0"?>
<!DOCTYPE xsd:schema SYSTEM "XMLSchema.dtd" [
<!ENTITY % p 'xsd:'>
<!ENTITY % s ':xsd'>
]>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- this should not be accepted: simple types can't be circular -->
<xsd:element name="rec" type="recT1"/>
<xsd:simpleType name="recT1">
<xsd:union memberTypes="recT2 xsd:boolean"/>
</xsd:simpleType>
<xsd:simpleType name="recT2">
<xsd:union memberTypes="recT1 xsd:boolean"/>
</xsd:simpleType>
</xsd:schema>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment