Statistics
| Revision:

root / tmp / org.txm.tigersearch.rcp / groovy / org / txm / importer / tigersearch / TigerXMLHeader.xsd @ 911

History | View | Annotate | Download (4.5 kB)

1
<?xml version="1.0" encoding="UTF-8"?>
2
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3

    
4
 <!-- =======================================================================
5
      XML SubSchema for the header part of the TIGER-XML format
6
      http://www.ims.uni-stuttgart.de/projekte/TIGER/publicTigerXMLHeader.xsd
7
      =======================================================================
8
      TIGER Project, Wolfgang Lezius 
9
      IMS, University of Stuttgart, 04/01/2003
10
      ======================================================================= -->
11

    
12

    
13
  <!-- ======================================================
14
       DECLARATION OF THE HEADER
15
       ====================================================== -->
16

    
17

    
18
  <!-- declaration of the head element -->
19

    
20
  <xs:element name="head" type="headType"/>
21

    
22

    
23
  <!-- declaration of the header type -->
24

    
25
  <xs:complexType name="headType">
26

    
27
     <xs:sequence>
28
        <xs:element name="meta" type="metaType" minOccurs="0" maxOccurs="1"/>
29
        <xs:element name="annotation" type="annotationType" minOccurs="0" maxOccurs="1"/>
30
     <xs:/sequence>    
31

    
32
     <!-- optional: reference to external header file 
33

    
34
          The header of a TigerXML corpus can also be stored in separate file. 
35
          This attribute points to the external header file. The pointer is
36
          an URI. Examples: file:relative.xml or file:/path/to/absolute.xml
37

    
38
          Note: If there is a pointer to an external file, the head
39
                element must be empty. -->
40

    
41
     <xs:attribute name="external" type="xsd:anyURI"/>  
42

    
43
  <xs:/complexType>
44

    
45

    
46
  <!-- declaration of the meta information type -->
47

    
48
  <xs:complexType name="metaType">
49

    
50
    <xs:sequence>
51
      <xs:element name="name" type="xsd:string" minOccurs="0" maxOccurs="1"/>
52
      <xs:element name="author" type="xsd:string" minOccurs="0" maxOccurs="1"/>
53
      <xs:element name="date" type="xsd:string" minOccurs="0" maxOccurs="1"/>
54
      <xs:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
55
      <xs:element name="format" type="xsd:string" minOccurs="0" maxOccurs="1"/>
56
      <xs:element name="history" type="xsd:string" minOccurs="0" maxOccurs="1"/>
57
    <xs:/sequence>    
58

    
59
  <xs:/complexType>
60
  
61

    
62
  <!-- declaration of the annotation type -->
63

    
64
  <xs:complexType name="annotationType">
65

    
66
    <xs:sequence>
67
      <xs:element name="feature" type="featureType" minOccurs="1" maxOccurs="unbounded"/>
68
      <xs:element name="edgelabel" type="edgelabelType" minOccurs="0" maxOccurs="1"/>
69
      <xs:element name="secedgelabel" type="edgelabelType" minOccurs="0" maxOccurs="1"/>
70
    <xs:/sequence>
71

    
72
  <xs:/complexType>
73

    
74

    
75
  <!-- declaration of the feature type -->
76

    
77
  <xs:complexType name="featureType">
78

    
79
    <xs:sequence>
80
       <xs:element name="value" type="featurevalueType" minOccurs="0" maxOccurs="unbounded"/>
81
    <xs:/sequence>
82
    
83
    <xs:attribute name="name" type="featurenameType" use="required"/>
84

    
85
    <xs:attribute name="domain" use="required">
86
       <xs:simpleType>
87
         <xs:restriction base="xsd:string">
88
           <xs:enumeration value="T"/>     <!-- feature for terminal nodes -->
89
           <xs:enumeration value="NT"/>    <!-- feature for nonterminal nodes -->
90
           <xs:enumeration value="FREC"/>  <!-- feature for both -->
91
         <xs:/restriction>
92
       <xs:/simpleType>
93
    <xs:/attribute>
94

    
95
  <xs:/complexType>
96

    
97

    
98
  <!-- declaration of the (secondary) edge label type -->
99

    
100
  <xs:complexType name="edgelabelType">
101

    
102
    <xs:sequence>
103
       <xs:element name="value" type="featurevalueType" minOccurs="0" maxOccurs="unbounded"/>
104
    <xs:/sequence>
105
    
106
  <xs:/complexType>
107

    
108

    
109
  <!-- declaration of the feature value type -->
110

    
111
  <xs:complexType name="featurevalueType">
112

    
113
    <xs:simpleContent>   <!-- element content: documentation of the feature value -->
114
      <xs:extension base="xsd:string">
115
        <xs:attribute name="name" type="xsd:string"/>
116
      <xs:/extension>
117
    <xs:/simpleContent>
118

    
119

    
120
  <xs:/complexType>
121

    
122

    
123
  <!-- ======================================================
124
       HEADER DECLARATIONS THAT SHOULD BE REFINED
125
       ====================================================== -->
126

    
127
  <!-- declaration of the FEATURE NAMES used in the corpus header;
128
       this type is unrestricted, but should be refined by a 
129
       specialised, corpus-dependent schema -->
130

    
131
  <xs:simpleType name="featurenameType">
132

    
133
    <xs:restriction base="xsd:string">
134
      <xs:minLength value="1"/>
135
      <xs:maxLength value="20"/>
136
      <xs:whiteSpace value="preserve"/>
137
    <xs:/restriction>
138

    
139
  <xs:/simpleType>
140

    
141

    
142
<xs:/schema>