-
Notifications
You must be signed in to change notification settings - Fork 2
/
svrl.rnc
143 lines (140 loc) · 4.91 KB
/
svrl.rnc
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Copyright © ISO/IEC 2015
#
# The following permission notice and disclaimer shall be included in all
# copies of this XML schema ("the Schema"), and derivations of the Schema:
# Permission is hereby granted, free of charge in perpetuity, to any
# person obtaining a copy of the Schema, to use, copy, modify, merge and
# distribute free of charge, copies of the Schema for the purposes of
# developing, implementing, installing and using software based on the
# Schema, and to permit persons to whom the Schema is furnished to do so,
# subject to the following conditions:
#
# THE SCHEMA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SCHEMA OR THE USE OR
# OTHER DEALINGS IN THE SCHEMA.
#
# In addition, any modified copy of the Schema shall include the following
# notice:
#
# THIS SCHEMA HAS BEEN MODIFIED FROM THE SCHEMA DEFINED IN ISO/IEC 19757-3,
# AND SHOULD NOT BE INTERPRETED AS COMPLYING WITH THAT STANDARD."
# THIS SCHEMA HAS BEEN MODIFIED FROM THE SCHEMA DEFINED IN ISO/IEC 19757-3,
# AND SHOULD NOT BE INTERPRETED AS COMPLYING WITH THAT STANDARD.
# The following corrections have been made:
# double quotes on SVRL string
# attribute id in attlist.assert-and-report corrected to xsd:NMTOKEN as is from assert/@id
# attribute id in fired-rule corrected to xsd:NMTOKEN as is from rule/@id
# attribute id in attlist.assert-and-report corrected to xsd:NMTOKEN because multiple documents input
namespace local = ""
default namespace svrl = "http://purl.oclc.org/dsdl/svrl"
schematron-output =
element schematron-output {
attribute title { text }?,
attribute phase { xsd:NMTOKEN }?,
attribute schemaVersion { text }?,
human-text*,
ns-prefix-in-attribute-values*,
(active-pattern,
(fired-rule, (failed-assert | successful-report)*)+)+
}
# only namespaces from sch:ns need to be reported
ns-prefix-in-attribute-values =
element ns-prefix-in-attribute-values {
attribute prefix { xsd:NMTOKEN },
attribute uri { text },
empty
}
# only active patterns are reported
active-pattern =
element active-pattern {
attribute id { xsd:NMTOKEN }?,
attribute documents { text }?,
attribute name { text }?,
attribute role { xsd:NMTOKEN }?,
empty
}
# only rules that are fired are reported,
fired-rule =
element fired-rule {
attribute id { xsd:NMTOKEN }?,
attribute name { text }?,
attribute context { text },
attribute role { xsd:NMTOKEN }?,
attribute flag { xsd:NMTOKEN }?,
empty
}
# only references are reported, not the diagnostic
diagnostic-reference =
element diagnostic-reference {
attribute diagnostic { xsd:NMTOKEN },
human-text
}
# only failed assertions are reported
failed-assert =
element failed-assert {
attlist.assert-and-report, diagnostic-reference*, property-reference*, human-text
}
# only successful asserts are reported
successful-report =
element successful-report {
attlist.assert-and-report, diagnostic-reference*, property-reference*, human-text
}
# property-reference
property-reference =
element property-reference {
attribute property { xsd:NMTOKEN },
attribute role { text }?,
attribute scheme { text }?,
human-text
}
# human text
human-text =
element text {
attribute xml:space { text }?,
attribute xml:lang { text }?,
attribute see { text }?,
attribute icon { text }?,
attribute fpi { text }?,
rich-text
}
# rich text
rich-text = (foreign | dir | span | emph | text)*
# directionality
dir =
element dir {
attribute class { text }?,
attribute dir { text }?,
text
}
# emphasis
emph =
element emph {
attribute class { text }?,
text
}
# arbitrary markup
span =
element span {
attribute class { text },
text
}
# foreign
foreign = foreign-attributes | foreign-element
foreign-attributes = attribute * - (xml:* | local:*) { text }*
foreign-element =
element * - svrl:* {
(attribute * { text }
| foreign-element
| text)*
}
attlist.assert-and-report =
attribute id { xsd:NMTOKEN }?,
attribute location { text },
attribute test { text },
attribute role { xsd:NMTOKEN }?,
attribute flag { xsd:NMTOKEN }?
start = schematron-output