forked from OpenMath/OMSTD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
omcd2.rnc
57 lines (53 loc) · 1.48 KB
/
omcd2.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
# *********************************************
#
# Relax NG Schema for OpenMath CD
#
# *********************************************
default namespace = "http://www.openmath.org/OpenMathCD"
include "openmath2.rnc" {start = CD}
CDComment = element CDComment { text }
CDName = element CDName { xsd:NCName }
CDUses = element CDUses { CDName* }
CDURL = element CDURL { xsd:anyURI }
CDBase = element CDBase { xsd:anyURI }
text-or-om = (text | OMOBJ)*
CDReviewDate = element CDReviewDate { xsd:date }
CDDate = element CDDate { xsd:date }
CDVersion = element CDVersion { xsd:nonNegativeInteger }
CDRevision = element CDRevision { xsd:nonNegativeInteger }
CDStatus = element CDStatus {
"official" |
"experimental" |
"private" |
"obsolete"}
Description = element Description { text }
Name = element Name { xsd:NCName }
Role = element Role {
"binder" |
"attribution" |
"semantic-attribution" |
"error" |
"application" |
"constant" }
CMP = element CMP { text }
FMP = element FMP {
attribute kind {xsd:string}?,
OMOBJ
}
# allow embedded OM
Example = element Example { text-or-om }
CDDefinition =
element CDDefinition {
CDComment*,
(Name & Role? & Description),
(CDComment | Example | FMP | CMP)*
}
CD =
element CD {
(CDComment* & Description? &
CDName & CDURL? & CDBase? &
CDReviewDate? & CDDate & CDStatus &
CDUses? &
CDVersion & CDRevision),
( CDDefinition,CDComment* )+
}