blob: 4b1e4225e1a36f600ae49882f9c6571b698722b5 (
plain)
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
|
<?xml version="1.0"?>
<ontology name="meta">
<import rel="typesystem" src="affiliation"/>
<import rel="typesystem" src="email"/>
<import rel="typesystem" src="version"/>
<import rel="ontology" src="book"/>
<struct name="meta" cardinality="{1}" transparent="true">
<field>
<childRef ref="authors"/>
<childRef ref="version"/>
</field>
<parentRef ref="book">
<field name="meta" subtree="true" optional="true"/>
</parentRef>
<parentRef ref="chapter">
<field name="meta" subtree="true" optional="true"/>
</parentRef>
<!-- One could also include "article" and other things here -->
</struct>
<struct name="person">
<primitive subtree="true" name="firstName" type="string"/>
<primitive subtree="true" name="secondNames" type="string[]" optional="true"/>
<primitive subtree="true" name="lastName" type="string"/>
<primitive subtree="true" name="email" type="email" optional="true"/>
<primitive subtree="true" name="affiliation" type="affiliation" optional="true"/>
</struct>
<!-- wrapper author tag to allow specifying no authors whatsoever. But if
an author is specified it has to be at least one primary author. -->
<struct name="authors" transparent="true" cardinality="{0-1}">
<field>
<childRef ref="author"/>
</field>
</struct>
<!-- no explicit cardinality, because we might have multiple authors -->
<struct name="author" isa="person"/>
<!-- but we need at least one primary author -->
<struct name="primaryAuthor" cardinality="{>0}" isa="author"/>
<!-- version intermediate struct -->
<struct name="version" cardinality="{0-1}">
<primitive type="version"/>
</struct>
</ontology>
|