-
Notifications
You must be signed in to change notification settings - Fork 380
Expand file tree
/
Copy pathschema.rnc
More file actions
150 lines (143 loc) · 3.83 KB
/
schema.rnc
File metadata and controls
150 lines (143 loc) · 3.83 KB
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
144
145
146
147
148
149
150
# default namespace = ""
b = element b { MarkupText }
i = element i { MarkupText }
url = element url {
attribute type { xsd:NCName }? & xsd:anyURI
}
fixed-case = element fixed-case { MarkupText }
tex-math = element tex-math { text }
MarkupText = (text | b | i | url | fixed-case | tex-math )+
first = element first { xsd:string { pattern="(\S(.*\S)?)?" } }
last = element last { xsd:string { pattern="\S(.*\S)?" } }
affiliation = element affiliation { text }
Variant = element variant { attribute script { xsd:string }, (first? & last) }
# Store bare 16-digit hyphenated ORCID iD with checksum (last char may be X)
OrcidId = xsd:string { pattern="([0-9]{4}-){3}[0-9]{3}[0-9X]" }
Person =
attribute id { xsd:NCName }?,
attribute orcid { OrcidId }?,
(first? & last & Variant? & affiliation?)
local-filename = xsd:string { pattern="[A-Za-z0-9._\-]+" }
bibtex-key = xsd:string { pattern="[A-Za-z0-9\-]+" }
checksum = attribute hash { xsd:string {minLength="8" maxLength="8" pattern="[0-9a-f]*"} }
url-with-checksum = element url {
xsd:anyURI {pattern="https?://.*"} |
(local-filename, checksum)
}
attachment = element attachment {
attribute type { xsd:NCName }?,
checksum,
local-filename
}
Revision = element revision {
attribute id { xsd:positiveInteger },
attribute href { local-filename },
attribute date { xsd:date }?,
checksum,
text
}
Talk = element talk {
attribute type { xsd:string }?,
(element title { MarkupText }
& element speaker { Person }*
& url?
)
}
Paper = element paper {
attribute id { xsd:positiveInteger },
attribute ingest-date { xsd:date }?,
attribute type { xsd:string }?,
(element abstract { MarkupText }?
& attachment*
& element bibkey { bibtex-key }
& element author { Person }*
& element doi { xsd:anyURI }?
& element editor { Person }*
& Revision*
& element erratum {
attribute id { xsd:positiveInteger },
attribute date { xsd:date }?,
checksum,
local-filename
}*
& element retracted {
attribute date { xsd:date },
text
}?
& element removed {
attribute date { xsd:date },
text
}?
& element issue { xsd:nonNegativeInteger }?
& element journal { text }?
& element mrf {
attribute src { xsd:NCName },
xsd:NCName
}?
& element note { text }?
& element pages { text }?
& element title { MarkupText }
& url-with-checksum?
& element video {
attribute href { xsd:anyURI },
attribute permission { xsd:boolean }?
}*
& element language { xsd:language }?
& element award { text }*
)
}
Meta = element meta {
(element booktitle { MarkupText }
& element shortbooktitle { MarkupText }?
& element editor { Person }*
& element publisher { text }?
& element address { text }?
& element month { text }?
& element year { xsd:gYear }
& element isbn { xsd:NMTOKEN }?
& url-with-checksum?
& element doi { xsd:anyURI }?
& element venue { text }+
& element journal-volume { xsd:string }?
& element journal-issue { xsd:string }?
& element journal-title { xsd:string }?
)
}
Frontmatter = element frontmatter {
(url-with-checksum?
& element pages { text }?
& element bibkey { bibtex-key }
& Revision*
& attachment*
& element doi { xsd:anyURI }?
)
}
Volume = element volume {
attribute id { xsd:string },
attribute type { "journal" | "proceedings" },
attribute ingest-date { xsd:date }?,
Meta,
Frontmatter?,
Paper*
}
Event = element event {
attribute id { xsd:string },
(element meta {
(element title { MarkupText }?
& element location { text }?
& element dates { text }?
)
}?
& element links { url* }?
& Talk*
& element colocated {
element volume-id { text }*
}?
)
}
Collection = element collection {
attribute id { xsd:string },
Volume*,
Event?
}
start = Collection