Project

Profile

Help

How to connect?
Download (5.55 KB) Statistics
| Branch: | Revision:

he / src / samples / schemas / validation-reports.xsd @ af4371f2

1
<?xml version="1.0" encoding="UTF-8"?>
2
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" 
3
  targetNamespace="http://saxon.sf.net/ns/validation" xmlns:saxon="http://saxon.sf.net/" xmlns:v="http://saxon.sf.net/ns/validation">
4
  <xs:element name="validation-reports">
5
    <xs:complexType>
6
      <xs:sequence>
7
        <xs:element maxOccurs="unbounded" ref="v:validation-report"/>
8
      </xs:sequence>
9
    </xs:complexType>
10
  </xs:element>
11
  <xs:element name="validation-report">
12
    <xs:annotation>
13
      <xs:documentation>Defines the individual report for a source document.</xs:documentation>
14
    </xs:annotation>
15
    <xs:complexType>
16
      <xs:sequence>
17
        <xs:element maxOccurs="unbounded" ref="v:error"/>
18
        <xs:element ref="v:meta-data" maxOccurs="1" minOccurs="1"/>
19
      </xs:sequence>
20
      <xs:attribute name="system-id" use="required" type="xs:anyURI"/>
21
    </xs:complexType>
22
  </xs:element>
23
  <xs:element name="error">
24
    <xs:complexType mixed="true">
25
      <xs:attribute name="column" use="optional" type="xs:integer">
26
        <xs:annotation>
27
          <xs:documentation>Defines the column number where the error occurs. 
28
            This attribute and the path attribute are mutually exclusive.</xs:documentation>
29
        </xs:annotation>
30
      </xs:attribute>
31
      <xs:attribute name="path" use="optional" type="xs:anyURI">
32
        <xs:annotation>
33
          <xs:documentation>Defines the path where the error occurs if the column number is unavailable.
34
            This attribute and the path attribute are mutually exclusive.</xs:documentation>
35
        </xs:annotation>
36
      </xs:attribute>
37
      <xs:attribute name="line" use="optional" type="xs:integer">
38
        <xs:annotation>
39
          <xs:documentation>Defines the line number location for the validation error if available.</xs:documentation>
40
        </xs:annotation>
41
      </xs:attribute>
42
      <xs:attribute name="context-path" use="optional" type="xs:anyURI" >
43
        <xs:annotation>
44
          <xs:documentation>Defines a hierarchic path giving the logical position in the instance 
45
            document where the validation error was found</xs:documentation>
46
        </xs:annotation>
47
      </xs:attribute>
48
      <xs:attribute name="xsd-part" use="optional" type="xs:string">
49
        <xs:annotation>
50
          <xs:documentation>Defines the part number of the XSD schema specification containing 
51
            the constraint that has been violated</xs:documentation>
52
        </xs:annotation>
53
      </xs:attribute>
54
      <xs:attribute name="constraint" use="optional" type="xs:string">
55
        <xs:annotation>
56
          <xs:documentation>Get the clause number of the rule that has been violated</xs:documentation>
57
        </xs:annotation>
58
      </xs:attribute>
59
      <xs:attribute name="system-id" use="optional" type="xs:anyURI"/>      
60
    </xs:complexType>
61
  </xs:element>
62
  <xs:element name="meta-data">
63
    <xs:annotation>
64
      <xs:documentation>Defines a summary of the validation report for the specific source document</xs:documentation>
65
    </xs:annotation>
66
    <xs:complexType>
67
      <xs:sequence>
68
        <xs:element ref="v:validator"/>
69
        <xs:element ref="v:results"/>
70
        <xs:element ref="v:schema"/>
71
        <xs:element ref="v:run"/>
72
      </xs:sequence>
73
    </xs:complexType>
74
  </xs:element>
75
  <xs:element name="validator">
76
    <xs:complexType>
77
      <xs:attribute name="name" use="required" type="xs:string">
78
        <xs:annotation>
79
          <xs:documentation>Defines the Schema validation product</xs:documentation>
80
        </xs:annotation>
81
      </xs:attribute>
82
      <xs:attribute name="vendor" use="optional" type="xs:string">
83
        <xs:annotation>
84
          <xs:documentation>Defines the vendor of the Schema validation product</xs:documentation>
85
        </xs:annotation>
86
      </xs:attribute>
87
      <xs:attribute name="version" use="required" type="xs:string">
88
        <xs:annotation>
89
          <xs:documentation>The version of the product used to validate the source document</xs:documentation>
90
        </xs:annotation>
91
      </xs:attribute>
92
    </xs:complexType>
93
  </xs:element>
94
  <xs:element name="results">
95
    <xs:complexType>
96
      <xs:attribute name="errors" use="required" type="xs:integer">
97
        <xs:annotation>
98
          <xs:documentation>Defines the number of the validation error found in the source document</xs:documentation>
99
        </xs:annotation>
100
      </xs:attribute>
101
      <xs:attribute name="warnings" use="required" type="xs:integer">
102
        <xs:annotation>
103
          <xs:documentation>Defines the number of the validation warnings found in the source document</xs:documentation>
104
        </xs:annotation>
105
      </xs:attribute>
106
    </xs:complexType>
107
  </xs:element>
108
  <xs:element name="schema">
109
    <xs:complexType>
110
      <xs:attribute name="file" use="required" type="xs:anyURI">
111
        <xs:annotation>
112
          <xs:documentation>Defines the name of the XSD schema used to validate the source document</xs:documentation>
113
        </xs:annotation>
114
      </xs:attribute>
115
      <xs:attribute name="xsd-version" use="required" type="xs:decimal">
116
        <xs:annotation>
117
          <xs:documentation>Defines the XSD Schema version used to validate the source document</xs:documentation>
118
        </xs:annotation>
119
      </xs:attribute>
120
    </xs:complexType>
121
  </xs:element>
122
  <xs:element name="run">
123
    <xs:complexType>
124
      <xs:attribute name="at" use="required" type="xs:dateTime">
125
        <xs:annotation>
126
          <xs:documentation>Defines the date as to when the validation was run.</xs:documentation>
127
        </xs:annotation>
128
      </xs:attribute>
129
    </xs:complexType>
130
  </xs:element>
131
</xs:schema>
    (1-1/1)