1 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|
2 |
|
3 <xsd:element name="A" type="X"/> |
|
4 |
|
5 <!-- The purpose of this element is: |
|
6 a) To have a fixed attribute use |
|
7 b) To have an attribute with a fixed attribute declaration |
|
8 c) To have a complex type with simple content and a fixed value |
|
9 d) To have an element declaration with a fixed value |
|
10 --> |
|
11 <xsd:element name="B" fixed="howdy"> |
|
12 <xsd:complexType> |
|
13 <xsd:simpleContent> |
|
14 <xsd:extension base="xsd:string"> |
|
15 <xsd:attribute ref="fixedAttr" use="required" fixed="hello"/> |
|
16 </xsd:extension> |
|
17 </xsd:simpleContent> |
|
18 </xsd:complexType> |
|
19 </xsd:element> |
|
20 |
|
21 <xsd:element name="D" type="xsd:string" fixed="hey"/> |
|
22 |
|
23 <xsd:attribute name="attr" type="xsd:string"/> |
|
24 |
|
25 <xsd:attribute name="unparsedEntityAttr" type="xsd:ENTITIES"/> |
|
26 |
|
27 <xsd:attribute name="fixedAttr" type="xsd:string" fixed="hello"/> |
|
28 |
|
29 <xsd:complexType name="X"> |
|
30 <xsd:sequence> |
|
31 <xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
|
32 </xsd:sequence> |
|
33 <xsd:attribute ref="attr"/> |
|
34 <xsd:attribute ref="unparsedEntityAttr"/> |
|
35 </xsd:complexType> |
|
36 |
|
37 <xsd:complexType name="Y"> |
|
38 <xsd:complexContent> |
|
39 <xsd:restriction base="X"> |
|
40 <xsd:sequence> |
|
41 <xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
|
42 </xsd:sequence> |
|
43 <xsd:attribute ref="attr" fixed="typeY"/> |
|
44 <xsd:attribute ref="unparsedEntityAttr" use="prohibited"/> |
|
45 </xsd:restriction> |
|
46 </xsd:complexContent> |
|
47 </xsd:complexType> |
|
48 |
|
49 <!-- Z is the same as X, but is not derived from X. --> |
|
50 <xsd:complexType name="Z"> |
|
51 <xsd:sequence> |
|
52 <xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
|
53 </xsd:sequence> |
|
54 <xsd:attribute ref="attr"/> |
|
55 <xsd:attribute ref="unparsedEntityAttr"/> |
|
56 </xsd:complexType> |
|
57 |
|
58 <xsd:complexType name="idType"> |
|
59 <xsd:complexContent> |
|
60 <xsd:extension base="X"> |
|
61 <xsd:attribute name="idAttr" type="xsd:ID"/> |
|
62 </xsd:extension> |
|
63 </xsd:complexContent> |
|
64 </xsd:complexType> |
|
65 |
|
66 <xsd:complexType name="idrefType"> |
|
67 <xsd:complexContent> |
|
68 <xsd:extension base="X"> |
|
69 <xsd:attribute name="idrefAttr" type="xsd:IDREF"/> |
|
70 </xsd:extension> |
|
71 </xsd:complexContent> |
|
72 </xsd:complexType> |
|
73 |
|
74 </xsd:schema> |
|