Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / xsd / restricting_complex_types.xsd
CommitLineData
970ed795
EL
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3abe9331 3 Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
4
5 All rights reserved. This program and the accompanying materials
6 are made available under the terms of the Eclipse Public License v1.0
7 which accompanies this distribution, and is available at
8 http://www.eclipse.org/legal/epl-v10.html
9 -->
10<schema xmlns="http://www.w3.org/2001/XMLSchema"
11xmlns:this="www.example.org"
12targetNamespace="www.example.org">
13
14<annotation><documentation xml:lang="EN">base types</documentation></annotation>
15
16<element name="comment" type="string"/>
17
18 <complexType name="Items">
19 <sequence>
20 <element name="item" minOccurs="0" maxOccurs="unbounded">
21 <complexType>
22 <sequence>
23 <element name="productName" type="string"/>
24 <element name="quantity">
25 <simpleType>
26 <restriction base="positiveInteger">
27 <maxExclusive value="100"/>
28 </restriction>
29 </simpleType>
30 </element>
31 <element name="USPrice" type="decimal"/>
32 <element ref="this:comment" minOccurs="0"/>
33 <element name="shipDate" type="date" minOccurs="0"/>
34 </sequence>
35 <attribute name="partNum" type="this:SKU" use="required"/>
36 </complexType>
37 </element>
38 </sequence>
39 </complexType>
40
41
42 <simpleType name="SKU">
43 <restriction base="string">
44 <pattern value="\d{3}-[A-Z]{2}"/>
45 </restriction>
46 </simpleType>
47
48<complexType name="PurchaseOrderType">
49 <sequence>
50 <element name="shipTo" type="string"/>
51 <element name="billTo" type="string"/>
52 <element ref="this:comment" minOccurs="0"/>
53 <element name="items" type="this:Items"/>
54 </sequence>
55 <attribute name="shipDate" type="date"/>
56 <attribute name="orderDate" type="date"/>
57 </complexType>
58
59
60
61<annotation><documentation xml:lang="EN">restricting types</documentation></annotation>
62
63<complexType name="RestrictedPurchaseOrderType">
64 <complexContent>
65 <restriction base="this:PurchaseOrderType">
66 <sequence>
67 <element name="shipTo" type="string"/>
68 <element name="billTo" type="string"/>
69 <element ref="this:comment" minOccurs="1"/>
70 <element name="items" type="this:Items"/>
71 </sequence>
72 <attribute name="shipDate" type="date" use="prohibited" />
73 <attribute name="orderDate" type="date" use="required" />
74 </restriction>
75 </complexContent>
76</complexType>
77
78
79
80</schema>
This page took 0.042668 seconds and 5 git commands to generate.