summaryrefslogtreecommitdiff
path: root/testdata/integration/osxml/meta_ontology.osxml
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-04-08 12:20:19 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:19:33 +0200
commit7a6c99c0b09377bca0b77d2918cf1e2092b3f59c (patch)
tree582118cdb815c7d942c4b0ae9d94642e3ba01602 /testdata/integration/osxml/meta_ontology.osxml
parent003d5e57f6f4c8996dcd9cdd03b61004307fd180 (diff)
refactored the more sophisticated OSXML parser tests to the integration test folder.
Diffstat (limited to 'testdata/integration/osxml/meta_ontology.osxml')
-rw-r--r--testdata/integration/osxml/meta_ontology.osxml49
1 files changed, 49 insertions, 0 deletions
diff --git a/testdata/integration/osxml/meta_ontology.osxml b/testdata/integration/osxml/meta_ontology.osxml
new file mode 100644
index 0000000..eb392ce
--- /dev/null
+++ b/testdata/integration/osxml/meta_ontology.osxml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<ontology name="meta">
+
+ <import rel="typesystem" src="./affiliation_typesystem"/>
+ <import rel="typesystem" src="./email_typesystem"/>
+ <import rel="typesystem" src="./version_typesystem"/>
+ <import rel="ontology" src="./book_ontology"/>
+
+ <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>