summaryrefslogtreecommitdiff
path: root/examples/manual
diff options
context:
space:
mode:
authorpab <devnull@localhost>2009-08-25 02:57:46 +0000
committerpab <devnull@localhost>2009-08-25 02:57:46 +0000
commitd07a4306c6ba1e395adc99aa4e2d5615d4d9441b (patch)
treece870375765fca6ee7b5d7470dfe5cebb579a7c5 /examples/manual
parent9d279077a72be29b7dad09febd9fc3d0e3edd5ad (diff)
Revert duplication of address material having fixed #46
Diffstat (limited to 'examples/manual')
-rw-r--r--examples/manual/demo4a1.out2
-rw-r--r--examples/manual/nsaddress.xsd55
2 files changed, 2 insertions, 55 deletions
diff --git a/examples/manual/demo4a1.out b/examples/manual/demo4a1.out
index 7ee913b..15317ea 100644
--- a/examples/manual/demo4a1.out
+++ b/examples/manual/demo4a1.out
@@ -13,4 +13,4 @@ Traceback (most recent call last):
return self.XsdConstraintsOK(self)
File "/home/pab/pyxb/dev/pyxb/binding/basis.py", line 785, in XsdConstraintsOK
raise pyxb.BadTypeValueError('%s violation for %s in %s' % (f.Name(), value, cls.__name__))
-pyxb.exceptions_.BadTypeValueError: enumeration violation for NY in USState_
+pyxb.exceptions_.BadTypeValueError: enumeration violation for NY in USState
diff --git a/examples/manual/nsaddress.xsd b/examples/manual/nsaddress.xsd
index b803aa3..d864257 100644
--- a/examples/manual/nsaddress.xsd
+++ b/examples/manual/nsaddress.xsd
@@ -1,58 +1,5 @@
<xsd:schema
targetNamespace="URN:address"
- xmlns:tns="URN:address"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:complexType name="Address">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="street" type="xsd:string"/>
- <xsd:element name="city" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="USAddress">
- <xsd:complexContent>
- <xsd:extension base="tns:Address">
- <xsd:sequence>
- <xsd:element name="state" type="tns:USState"/>
- <xsd:element name="zip" type="xsd:positiveInteger"/>
- </xsd:sequence>
- <xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:element name="USAddress" type="tns:USAddress"/>
-
- <xsd:complexType name="UKAddress">
- <xsd:complexContent>
- <xsd:extension base="tns:Address">
- <xsd:sequence>
- <xsd:element name="postcode" type="tns:UKPostcode"/>
- </xsd:sequence>
- <attribute name="exportCode" type="xsd:positiveInteger" fixed="1"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- other Address derivations for more countries -->
-
- <xsd:simpleType name="USState">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="AK"/>
- <xsd:enumeration value="AL"/>
- <xsd:enumeration value="AR"/>
- <xsd:enumeration value="AZ"/>
- <!-- and so on ... -->
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:element name="USState" type="tns:USState"/>
-
- <!-- simple type definition for UKPostcode -->
- <!-- *** pyxb mod: provide missing STD *** -->
- <xsd:simpleType name="UKPostcode">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[A-Z]{2}\d\s\d[A-Z]{2}"/>
- </xsd:restriction>
- </xsd:simpleType>
-
+ <xsd:include schemaLocation="address.xsd"/>
</xsd:schema>