forked from acl-org/acl-anthology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.rnc
122 lines (118 loc) · 3.19 KB
/
schema.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
# default namespace = ""
b = element b { MarkupText }
i = element i { MarkupText }
url = element url { 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 { text }
last = element last { text }
Variant = element variant { attribute script { xsd:string }, (first? & last) }
Person = attribute id { xsd:NCName }?, (first? & last & Variant?)
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
}
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 volume { xsd:positiveInteger }?
& element language { xsd:language }?
& element award { text }*
& element pwcdataset {
attribute url { xsd:anyURI },
text
}*
& element pwccode {
attribute url { xsd:anyURI },
attribute additional { xsd:boolean },
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 volume { xsd:positiveInteger }?
& (element ISBN { xsd:NMTOKEN } | element isbn { xsd:NMTOKEN })?
& url-with-checksum?
& element doi { xsd:anyURI }?
)
}
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 ingest-date { xsd:date }?,
Meta,
Frontmatter?,
Paper*
}
Collection = element collection {
attribute id { xsd:string },
Volume+
}
start = Collection