Sync with 5.4.2
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / XmlTest_xsds / XmlTest_complex_unique.xsd
1 <!--
2 Copyright (c) 2000-2015 Ericsson Telecom AB
3
4 All rights reserved. This program and the accompanying materials
5 are made available under the terms of the Eclipse Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <schema xmlns="http://www.w3.org/2001/XMLSchema"
10 xmlns:r3="www.XmlTest.org/complex_unique"
11 targetNamespace="www.XmlTest.org/complex_unique"
12 elementFormDefault="qualified">
13 <annotation>
14 <documentation xml:lang="en">
15 This documentum tests based on
16 XML Schema Part 0: Primer Second Edition
17 5 Advanced Concepts III. The Quantity Report
18 5.1 Specifying Uniqueness
19 XML Schema Part 1: Structures Second Edition
20 3.11.2 XML Representation of Identity-constraint Definition Schema Components
21 </documentation>
22 </annotation>
23
24 <element name="purchaseReport">
25 <complexType>
26 <sequence>
27 <element name="regions" type="r3:RegionsType"/>
28
29 <element name="parts" type="r3:PartsType"/>
30 </sequence>
31 <attribute name="period" type="duration"/>
32 <attribute name="periodEnding" type="date"/>
33 </complexType>
34
35 <unique name="dummy1">
36 <selector xpath="r3:regions/r3:zip"/>
37 <field xpath="@code"/>
38 </unique>
39
40 <key name="pNumKey">
41 <selector xpath="r3:parts/r3:part"/>
42 <field xpath="@number"/>
43 </key>
44
45 <keyref name="dummy2" refer="r3:pNumKey">
46 <selector xpath="r3:regions/r3:zip/r3:part"/>
47 <field xpath="@number"/>
48 </keyref>
49
50 </element>
51
52 <complexType name="RegionsType">
53 <sequence>
54 <element name="zip" maxOccurs="unbounded">
55 <complexType>
56 <sequence>
57 <element name="part" maxOccurs="unbounded">
58 <complexType>
59 <complexContent>
60 <restriction base="anyType">
61 <attribute name="number" type="string"/>
62 <attribute name="quantity" type="positiveInteger"/>
63 </restriction>
64 </complexContent>
65 </complexType>
66 </element>
67 </sequence>
68 <attribute name="code" type="positiveInteger"/>
69 </complexType>
70 </element>
71 </sequence>
72 </complexType>
73
74 <complexType name="PartsType">
75 <sequence>
76 <element name="part" maxOccurs="unbounded">
77 <complexType>
78 <simpleContent>
79 <extension base="string">
80 <attribute name="number" type="string"/>
81 </extension>
82 </simpleContent>
83 </complexType>
84 </element>
85 </sequence>
86 </complexType>
87
88 </schema>
This page took 0.034267 seconds and 5 git commands to generate.