|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 |
| -<!-- This has been written in XSD 1.0 --> |
3 | 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
| 3 | + <xs:annotation> |
| 4 | + <xs:documentation xml:lang="en"> |
| 5 | + = Robot Framework output.xml schema = |
| 6 | + |
| 7 | + Compatible with Robot Framework 4.0 and newer. For more details see: |
| 8 | + https://github.com/robotframework/robotframework/tree/master/doc/schema |
| 9 | + |
| 10 | + Due to XSD 1.1 not being widely adopted, this schema is XSD 1.0 compatible. |
| 11 | + If you can use XSD 1.1, you can replace `xs:choice` groups with `xs:all` |
| 12 | + groups to make the schema more strict. |
| 13 | + </xs:documentation> |
| 14 | + </xs:annotation> |
4 | 15 | <xs:element name="robot" type="Robot" />
|
5 | 16 | <xs:complexType name="Robot">
|
6 | 17 | <xs:sequence>
|
| 18 | + <!-- Executed suite structure. --> |
7 | 19 | <xs:element name="suite" type="Suite" />
|
| 20 | + <!-- Execution statistics. Not read by Robot Framework itself. --> |
8 | 21 | <xs:element name="statistics" type="Statistics" minOccurs="0" />
|
| 22 | + <!-- Possible execution errors and warnings. --> |
9 | 23 | <xs:element name="errors" type="Errors" minOccurs="0" />
|
10 | 24 | </xs:sequence>
|
11 | 25 | <xs:attribute name="generator" type="xs:string" />
|
12 | 26 | <xs:attribute name="generated" type="xs:string" />
|
| 27 | + <!-- True when executing tasks, false (default) when executing tests. --> |
13 | 28 | <xs:attribute name="rpa" type="xs:boolean" />
|
| 29 | + <!-- Version of the schema output.xml is compatible with. --> |
14 | 30 | <xs:attribute name="schemaversion" type="xs:int" />
|
15 | 31 | </xs:complexType>
|
16 | 32 | <xs:complexType name="Suite">
|
17 | 33 | <xs:choice maxOccurs="unbounded">
|
| 34 | + <!-- These keywords are possible suite setup and teardown. |
| 35 | + They must have the `type` attribute set accordingly. --> |
18 | 36 | <xs:element name="kw" type="Keyword" minOccurs="0" maxOccurs="2" />
|
19 | 37 | <xs:element name="suite" type="Suite" minOccurs="0" maxOccurs="unbounded" />
|
20 | 38 | <xs:element name="test" type="Test" minOccurs="0" maxOccurs="unbounded" />
|
|
52 | 70 | <xs:element name="kw" type="Keyword" minOccurs="0" maxOccurs="unbounded" />
|
53 | 71 | <xs:element name="for" type="For" minOccurs="0" maxOccurs="unbounded" />
|
54 | 72 | <xs:element name="if" type="If" minOccurs="0" maxOccurs="unbounded" />
|
| 73 | + <!-- Assigned variables. --> |
55 | 74 | <xs:element name="var" type="xs:string" minOccurs="0" />
|
| 75 | + <!-- Arguments --> |
56 | 76 | <xs:element name="arg" type="xs:string" minOccurs="0" />
|
57 | 77 | <xs:element name="doc" type="xs:string" minOccurs="0" />
|
58 | 78 | <xs:element name="msg" type="Message" minOccurs="0" maxOccurs="unbounded" />
|
|
62 | 82 | </xs:choice>
|
63 | 83 | <xs:attribute name="name" type="xs:string" />
|
64 | 84 | <xs:attribute name="library" type="xs:string" />
|
| 85 | + <!-- Original name of the keyword when using embedded arguments, not used otherwise. --> |
65 | 86 | <xs:attribute name="sourcename" type="xs:string" />
|
| 87 | + <!-- Type is used only with setup and teardown. --> |
66 | 88 | <xs:attribute name="type" type="KeywordType" />
|
67 | 89 | </xs:complexType>
|
68 | 90 | <xs:simpleType name="KeywordType">
|
|
73 | 95 | </xs:simpleType>
|
74 | 96 | <xs:complexType name="For">
|
75 | 97 | <xs:choice maxOccurs="unbounded">
|
| 98 | + <!-- Loop variables. --> |
76 | 99 | <xs:element name="var" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
|
| 100 | + <!-- Loop values. --> |
77 | 101 | <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
|
| 102 | + <!-- Individual loop iterations. --> |
78 | 103 | <xs:element name="iter" type="ForIteration" minOccurs="0" maxOccurs="unbounded" />
|
79 | 104 | <xs:element name="msg" type="Message" minOccurs="0" maxOccurs="unbounded" />
|
80 | 105 | <xs:element name="doc" type="xs:string" minOccurs="0" />
|
|
92 | 117 | </xs:simpleType>
|
93 | 118 | <xs:complexType name="ForIteration">
|
94 | 119 | <xs:choice maxOccurs="unbounded">
|
| 120 | + <!-- Loop variables with iteration specific values. --> |
95 | 121 | <xs:element name="var" type="ForIterationVariable" minOccurs="0" maxOccurs="unbounded" />
|
96 | 122 | <xs:element name="kw" type="Keyword" minOccurs="0" maxOccurs="unbounded" />
|
97 | 123 | <xs:element name="for" type="For" minOccurs="0" maxOccurs="unbounded" />
|
|
110 | 136 | </xs:complexType>
|
111 | 137 | <xs:complexType name="If">
|
112 | 138 | <xs:choice maxOccurs="unbounded">
|
| 139 | + <!-- IF/ELSE branches. --> |
113 | 140 | <xs:element name="branch" type="IfBranch" minOccurs="0" maxOccurs="unbounded" />
|
114 | 141 | <xs:element name="msg" type="Message" minOccurs="0" maxOccurs="unbounded" />
|
115 | 142 | <xs:element name="doc" type="xs:string" minOccurs="0" />
|
|
161 | 188 | <xs:attribute name="status" type="StatusValue" use="required" />
|
162 | 189 | <xs:attribute name="starttime" type="xs:string" />
|
163 | 190 | <xs:attribute name="endtime" type="xs:string" />
|
| 191 | + <!-- Not set if both `starttime` and `endtime` are defined. --> |
164 | 192 | <xs:attribute name="elapsedtime" type="xs:string" />
|
165 | 193 | </xs:extension>
|
166 | 194 | </xs:simpleContent>
|
|
170 | 198 | <xs:enumeration value="PASS" />
|
171 | 199 | <xs:enumeration value="FAIL" />
|
172 | 200 | <xs:enumeration value="SKIP" />
|
173 |
| - <xs:enumeration value="NOT RUN" /> <!-- Not used with suite or test --> |
| 201 | + <!-- Only used with keywords, FORs and IFs, not with tests and suites. --> |
| 202 | + <xs:enumeration value="NOT RUN" /> |
174 | 203 | </xs:restriction>
|
175 | 204 | </xs:simpleType>
|
176 | 205 | <xs:complexType name="Timeout">
|
|
0 commit comments