summaryrefslogtreecommitdiff
path: root/xsd/tests/schema/ref-type/idrefs.xsd
blob: b68ed034972e68c52a2cdfc423fdf0870bae3809 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension"
            xmlns:test="http://www.codesynthesis.com/xmlns/test"
            targetNamespace="http://www.codesynthesis.com/xmlns/test">

  <!-- attribute -->
  
  <xsd:attribute name="attribute" type="xsd:IDREFS" xse:refType="test:a-author"/>
  
  <xsd:complexType name="a-author">
    <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="recommends" type="xsd:IDREFS" xse:refType="test:a-author"/>
  </xsd:complexType>

 
  <!-- element -->

  <xsd:element name="element" type="xsd:IDREFS" xse:refType="test:e-author"/>

  <xsd:complexType name="e-author">
    <xsd:sequence>
      <xsd:element name="recommends" type="xsd:IDREFS" xse:refType="test:e-author"/>
    </xsd:sequence>    
  </xsd:complexType>
  
  <!-- base -->
  
  <xsd:simpleType name="author-refs">
    <xsd:restriction base="xsd:IDREFS" xse:refType="test:e-author"/>
  </xsd:simpleType>


  <!-- itemType - illegal -->
  <!-- 
  <xsd:simpleType name="author-refss">
    <xsd:list itemType="xsd:IDREFS" xse:refType="test:e-author"/>
  </xsd:simpleType>
  -->

</xsd:schema>