Imported Upstream version 2.8.0
[platform/upstream/libxml2.git] / test / schemas / derivation-ok-restriction-2-1-1_0.xsd
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
3         xmlns="http://FOO" targetNamespace="http://FOO">
4
5         <xs:element name="foo">
6                 <xs:complexType>
7                         <xs:complexContent>
8                                 <xs:restriction base="typeA">
9                                         <xs:attribute name="barA_1" type="xs:string"  use="optional"/>
10                                         <!-- OK -->                                                             
11                                         <xs:attribute name="barA_2" type="xs:string"  use="required"/>
12                                         <!-- OK -->                                                                     
13                                         <xs:attribute name="barA_3" type="xs:string"  use="prohibited"/>
14                                         <!-- OK -->     
15
16                                         <xs:attribute name="barB_1" type="xs:string"  use="optional"/>          
17                                         <!-- 2.1.1 inconsistent ( OR 3 ) -->                                                    
18                                         <xs:attribute name="barB_2" type="xs:string"  use="required"/>
19                                         <!-- OK -->     
20                                         <xs:attribute name="barB_3" type="xs:string"  use="prohibited"/>
21                                         <!-- 3 -->                                                                      
22
23                                         <xs:attribute name="barC_1" type="xs:string"  use="optional"/>
24                                         <!-- 2.2  no match in base -->                                                          
25                                         <xs:attribute name="barC_2" type="xs:string"  use="required"/>  
26                                         <!-- 2.2  no match in base -->                          
27                                         <xs:attribute name="barC_3" type="xs:string"  use="prohibited"/>
28                                         <!-- OK -->     
29
30                                         <xs:attribute name="barD_1" type="xs:string"  use="optional"/>
31                                         <!-- 2.2  no match in base -->  
32                                         <xs:attribute name="barD_2" type="xs:string"  use="required"/>
33                                         <!-- 2.2  no match in base -->  
34                                         <xs:attribute name="barD_3" type="xs:string"  use="prohibited"/>
35                                         <!-- OK -->     
36
37                                 </xs:restriction>
38                         </xs:complexContent>
39                 </xs:complexType>
40         </xs:element>
41
42         <xs:complexType name="typeA">
43                 <xs:attribute name="barA_1" type="xs:string" use="optional"/>                   
44                 <xs:attribute name="barA_2" type="xs:string" use="optional"/>                   
45                 <xs:attribute name="barA_3" type="xs:string" use="optional"/>   
46                 <xs:attribute name="barB_1" type="xs:string" use="required"/>           
47                 <xs:attribute name="barB_2" type="xs:string" use="required"/>           
48                 <xs:attribute name="barB_3" type="xs:string" use="required"/>                   
49                 <xs:attribute name="barC_1" type="xs:string" use="prohibited"/> 
50                 <xs:attribute name="barC_2" type="xs:string" use="prohibited"/> 
51                 <xs:attribute name="barC_3" type="xs:string" use="prohibited"/> 
52         </xs:complexType>
53
54 </xs:schema>
55
56