summaryrefslogtreecommitdiff
path: root/test/schemas/restrict-CT-attr-ref_0.xsd
blob: a98b82a98b615103ae0ec8bea4a11cb719bbaf9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	attributeFormDefault="qualified"
	xmlns:foo="http://FOO"
	targetNamespace="http://FOO">

	<xsd:attribute name="id" type="xsd:ID"/>

	<xsd:complexType name="typeIDAttr">
    		<xsd:attribute ref="foo:id"/>
	</xsd:complexType>

	<xsd:simpleType name="fooID">
    		<xsd:restriction base="xsd:ID">
      			<xsd:pattern value="b\d{10}"/>
    		</xsd:restriction>
  	</xsd:simpleType>

	<xsd:element name="foo">
    		<xsd:complexType>
      			<xsd:complexContent>
        			<xsd:restriction base="foo:typeIDAttr">         
          				<xsd:attribute name="id" type="foo:fooID"/>
        			</xsd:restriction>
      			</xsd:complexContent>
    		</xsd:complexType>
  	</xsd:element>


</xsd:schema>