php-src/ext/dom/examples/shipping.xsd
Shane Caraveo 87bd7d57c6 Add schema and relaxNG validation support
domdocument->schemaValidate(string filename)
domdocument->schemaValidateSource(string xml)
domdocument->relaxNGValidate(string filename)
domdocument->relaxNGValidateSource(string xml)

also fix domelement->setAttributeNS
2003-10-05 20:45:27 +00:00

36 lines
1.2 KiB
XML

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="shipOrder" type="order"/>
<xsd:complexType name="order">
<xsd:all>
<xsd:element name="shipTo" type="shipAddress"/>
<xsd:element name="items" type="cdItems"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="shipAddress">
<xsd:all>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="address" type="xsd:string"/>
<xsd:element name="country" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="cdItems">
<xsd:sequence>
<xsd:element name="item" type="cdItem" maxOccurs="unbounded" minOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="cdItem">
<xsd:all>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="quantity" type="xsd:positiveInteger"/>
<xsd:element name="price" type="xsd:decimal"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>