Commit | Line | Data |
---|---|---|
970ed795 | 1 | <!-- |
3abe9331 | 2 | Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
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 | <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
10 | xmlns:strng= "http://www.XmlTest.org/string" | |
11 | targetNamespace="http://www.XmlTest.org/string"> | |
12 | ||
13 | <xsd:annotation> | |
14 | <xsd:documentation xml:lang="en"> | |
15 | This documentum tests based on | |
16 | XML Schema Part 0: Primer Second Edition, | |
17 | 2.3 Simple Types and | |
18 | Appendix B | |
19 | XML Schema Part 2: Datatypes Second Edition | |
20 | 3 Built-in Datatypes | |
21 | </xsd:documentation> | |
22 | </xsd:annotation> | |
23 | ||
24 | <xsd:element name="NameA" type="Name"/> | |
25 | ||
26 | <xsd:simpleType name="Name"> | |
27 | <xsd:restriction base="xsd:string"> | |
28 | </xsd:restriction> | |
29 | </xsd:simpleType> | |
30 | ||
31 | <xsd:element name="nameB" type="strng:name"/> | |
32 | ||
33 | <xsd:simpleType name="name"> | |
34 | <xsd:restriction base="xsd:string"> | |
35 | </xsd:restriction> | |
36 | </xsd:simpleType> | |
37 | ||
38 | <xsd:simpleType name="NameLength4" > | |
39 | <xsd:restriction base="xsd:string"> | |
40 | <xsd:length value="4" fixed="true"/> | |
41 | </xsd:restriction> | |
42 | </xsd:simpleType> | |
43 | ||
44 | <xsd:element name="Non-empty-string" type="strng:Non-empty-string"/> | |
45 | ||
46 | <xsd:simpleType name='Non-empty-string'> | |
47 | <xsd:restriction base='xsd:string' > | |
48 | <xsd:length value='3' fixed="false"/> | |
49 | </xsd:restriction> | |
50 | </xsd:simpleType> | |
51 | ||
52 | <xsd:simpleType name='Non-empty-stringChild'> | |
53 | <xsd:restriction base='strng:Non-empty-string'> | |
54 | <xsd:length value='3'/> | |
55 | </xsd:restriction> | |
56 | </xsd:simpleType> | |
57 | ||
58 | <xsd:simpleType name='Longer-string'> | |
59 | <xsd:restriction base='xsd:string'> | |
60 | <xsd:length value='5'/> | |
61 | </xsd:restriction> | |
62 | </xsd:simpleType> | |
63 | ||
64 | <xsd:simpleType name='Longer-stringChild'> | |
65 | <xsd:restriction base='strng:Longer-string'> | |
66 | <xsd:length value='5'/> | |
67 | </xsd:restriction> | |
68 | </xsd:simpleType> | |
69 | ||
70 | <xsd:simpleType name='StringMin'> | |
71 | <xsd:restriction base='xsd:string'> | |
72 | <xsd:minLength value='5'/> | |
73 | </xsd:restriction> | |
74 | </xsd:simpleType> | |
75 | ||
76 | <xsd:simpleType name='StringMax'> | |
77 | <xsd:restriction base='xsd:string'> | |
78 | <xsd:maxLength value='7'/> | |
79 | </xsd:restriction> | |
80 | </xsd:simpleType> | |
81 | ||
82 | <xsd:simpleType name='StringMinMax'> | |
83 | <xsd:restriction base='xsd:string'> | |
84 | <xsd:minLength value='5'/> | |
85 | <xsd:maxLength value='7'/> | |
86 | </xsd:restriction> | |
87 | </xsd:simpleType> | |
88 | ||
89 | <xsd:simpleType name='better-us-zipcode'> | |
90 | <xsd:restriction base='xsd:string'> | |
91 | <xsd:pattern value='[0-9]{5}(-[0-9]{4})?'/> | |
92 | </xsd:restriction> | |
93 | </xsd:simpleType> | |
94 | ||
95 | <!-- [$\c]+ means: (dollar or NameChar) 1 or more times. | |
96 | \c inside a character class gets "folded into" it. | |
97 | It should become: (pattern "dollar-or-namechar`s=[$\w\d.\-_:]+") --> | |
98 | <xsd:simpleType name='HO47449a'> | |
99 | <xsd:restriction base='xsd:string'> | |
100 | <xsd:pattern value='dollar-or-namechar`s=[$\c]+'/> | |
101 | </xsd:restriction> | |
102 | </xsd:simpleType> | |
103 | ||
104 | <!-- [\]$\c\[]+ means: (] or $ or NameChar or [) 1 or more times. | |
105 | \c is still inside a character class. | |
106 | It should become: (pattern "still-inside=[\]$\w\d.\-_:\[]+") --> | |
107 | <xsd:simpleType name='HO47449b'> | |
108 | <xsd:restriction base='xsd:string'> | |
109 | <xsd:pattern value='still-inside=[\]$\c\[]+'/> | |
110 | </xsd:restriction> | |
111 | </xsd:simpleType> | |
112 | ||
113 | <!-- [ ]$\c[ ]+ means: space, | |
114 | followed by dollar, a NameChar, | |
115 | and another space 1 or more times. | |
116 | This time, \c is outside the character class. | |
117 | It should become: (pattern "outside=[ ]$[\w\d.\-_:][ ]+") --> | |
118 | <xsd:simpleType name='HO47449c'> | |
119 | <xsd:restriction base='xsd:string'> | |
120 | <xsd:pattern value='outside=[ ]$\c[ ]+'/> | |
121 | </xsd:restriction> | |
122 | </xsd:simpleType> | |
123 | ||
3f84031e | 124 | <xsd:simpleType name='artf673083'> |
125 | <xsd:restriction base='xsd:string'> | |
126 | <xsd:pattern value='("\i\c*")'/> | |
127 | </xsd:restriction> | |
128 | </xsd:simpleType> | |
129 | ||
970ed795 EL |
130 | <xsd:simpleType name='mystring'> |
131 | <xsd:restriction base='xsd:string'> | |
132 | <xsd:minLength value='4'/> | |
133 | </xsd:restriction> | |
134 | </xsd:simpleType> | |
135 | ||
136 | <xsd:annotation> | |
137 | <xsd:documentation xml:lang="en"> | |
138 | Case Sensitivity Test follows: Mystring and mystring should be different | |
139 | </xsd:documentation> | |
140 | </xsd:annotation> | |
141 | ||
142 | <xsd:simpleType name='Mystring'> | |
143 | <xsd:restriction base='xsd:string'> | |
144 | <xsd:minLength value='4'/> | |
145 | </xsd:restriction> | |
146 | </xsd:simpleType> | |
147 | ||
148 | <xsd:element name="type" type="strng:type"/> | |
149 | ||
150 | <xsd:simpleType name='type'> | |
151 | <xsd:restriction base='xsd:string'> | |
152 | </xsd:restriction> | |
153 | </xsd:simpleType> | |
154 | ||
155 | </xsd:schema> |