Project

General

Profile

« Previous | Next » 

Revision 5948

Added by Jing Tao almost 14 years ago

Make the schema with included schemas valid.

View differences:

test/servertestfiles/company.xsd
4 4
            xmlns="http://www.company.org"
5 5
            elementFormDefault="qualified">
6 6
    <xsd:include schemaLocation="product.xsd"/>
7
    <xsd:include schemaLocation="./worker.xsd"/>
7 8
    <xsd:element name="company">
8 9
        <xsd:complexType>
9 10
            <xsd:sequence>
11
                <xsd:element name="worker" type="workerType"
12
                             maxOccurs="unbounded"/>
10 13
                <xsd:element name="product" type="productType"
11 14
                             maxOccurs="unbounded"/>
12 15
            </xsd:sequence>
test/servertestfiles/worker.xsd
1
<?xml version="1.0"?>
2
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
            targetNamespace="http://www.company.org"
4
            xmlns="http://www.company.org"
5
            elementFormDefault="qualified">
6
    <xsd:complexType name="workerType">
7
        <xsd:sequence>
8
           <xsd:element name="name" type="xsd:string"/>
9
           <xsd:element name="workID" type="xsd:string"/>
10
        </xsd:sequence>
11
    </xsd:complexType>
12
</xsd:schema>
13

  
14

  
test/servertestfiles/item.xsd
1 1
<?xml version="1.0"?>
2 2
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3 3
            targetNamespace="http://www.company.org"
4
            xmlns="http://www.item.org"
4
            xmlns="http://www.company.org"
5 5
            elementFormDefault="qualified">
6 6
    <xsd:complexType name="itemType">
7 7
        <xsd:sequence>
8
           <xsd:element name="name" type="xsd:string"/>
8
           <xsd:element name="itemName" type="xsd:string"/>
9 9
           <xsd:element name="serialNumber" type="xsd:string"/>
10 10
        </xsd:sequence>
11 11
    </xsd:complexType>
test/servertestfiles/product.xsd
1 1
<?xml version="1.0"?>
2 2
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3 3
            targetNamespace="http://www.company.org"
4
            xmlns="http://www.product.org"
4
            xmlns="http://www.company.org"
5 5
            elementFormDefault="qualified">
6 6
    <xsd:include schemaLocation="./item.xsd"/>
7 7
    <xsd:complexType name="productType">

Also available in: Unified diff