summaryrefslogtreecommitdiff
path: root/testdata/integration/domain_interaction
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-04-08 13:02:23 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:19:33 +0200
commit9d04fb897ffca7db1c6030125198345b2203e858 (patch)
treecdf212273ca5aecf1e88b5e77de09f6510f15e6e /testdata/integration/domain_interaction
parentea75789a02ed70d0cfa131ec615e2776f605d7dc (diff)
renamed the osxml integration folder to domain_interaction because that seemed semantically more fitting.
Diffstat (limited to 'testdata/integration/domain_interaction')
-rw-r--r--testdata/integration/domain_interaction/affiliation_typesystem.osxml10
-rw-r--r--testdata/integration/domain_interaction/bibliography_ontology.osxml42
-rw-r--r--testdata/integration/domain_interaction/book_ontology.osxml35
-rw-r--r--testdata/integration/domain_interaction/comments_ontology.osxml40
-rw-r--r--testdata/integration/domain_interaction/complex_book.in.osxml107
-rw-r--r--testdata/integration/domain_interaction/complex_book.out.osxml165
-rw-r--r--testdata/integration/domain_interaction/email_typesystem.osxml8
-rw-r--r--testdata/integration/domain_interaction/emphasis_ontology.osxml5
-rw-r--r--testdata/integration/domain_interaction/headings_ontology.osxml33
-rw-r--r--testdata/integration/domain_interaction/lists_ontology.osxml24
-rw-r--r--testdata/integration/domain_interaction/meta_ontology.osxml49
-rw-r--r--testdata/integration/domain_interaction/simple_annotation.in.osxml10
-rw-r--r--testdata/integration/domain_interaction/simple_annotation.out.osxml19
-rw-r--r--testdata/integration/domain_interaction/version_typesystem.osxml8
14 files changed, 555 insertions, 0 deletions
diff --git a/testdata/integration/domain_interaction/affiliation_typesystem.osxml b/testdata/integration/domain_interaction/affiliation_typesystem.osxml
new file mode 100644
index 0000000..d84dc30
--- /dev/null
+++ b/testdata/integration/domain_interaction/affiliation_typesystem.osxml
@@ -0,0 +1,10 @@
+<?xml version="1.0" standalone="yes"?>
+<typesystem name="affiliation">
+ <struct name="affiliation">
+ <field name="workgroup" type="string"/>
+ <field name="departement" type="string"/>
+ <field name="institution" type="string"/>
+ </struct>
+
+ <constant name="citec.sc" type="affiliation" value="[workgroup=Semantic Computing Group,departement=Center of Excellence Cognitive Interaction Technology (CITEC), institution=Bielefeld University]"/>
+</typesystem>
diff --git a/testdata/integration/domain_interaction/bibliography_ontology.osxml b/testdata/integration/domain_interaction/bibliography_ontology.osxml
new file mode 100644
index 0000000..0333133
--- /dev/null
+++ b/testdata/integration/domain_interaction/bibliography_ontology.osxml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<ontology name="bibliography">
+
+ <import rel="ontology" src="./book_ontology"/>
+ <import rel="ontology" src="./meta_ontology"/>
+
+ <struct name="bibliography" transparent="true">
+ <field>
+ <childRef ref="bibEntry"/>
+ </field>
+ <parentRef ref="book">
+ <field name="bibliography" subtree="true"/>
+ </parentRef>
+ </struct>
+ <struct name="bibEntry">
+ <field>
+ <childRef ref="meta.authors"/>
+ <childRef ref="title"/>
+ <childRef ref="year"/>
+ <childRef ref="journal"/>
+ <childRef ref="pages"/>
+ <childRef ref="location"/>
+ </field>
+ </struct>
+ <struct name="title" cardinality="{1}">
+ <primitive type="string"/>
+ </struct>
+ <struct name="year" cardinality="{1}">
+ <primitive type="int"/>
+ </struct>
+ <struct name="journal" cardinality="{0-1}">
+ <!-- here some kind of database reference would be better -->
+ <primitive type="string"/>
+ </struct>
+ <struct name="pages" cardinality="{0-1}">
+ <primitive type="cardinality"/>
+ </struct>
+ <struct name="location" cardinality="{0-1}">
+ <!-- here some kind of database reference would be better -->
+ <primitive type="string"/>
+ </struct>
+</ontology>
diff --git a/testdata/integration/domain_interaction/book_ontology.osxml b/testdata/integration/domain_interaction/book_ontology.osxml
new file mode 100644
index 0000000..2c615ca
--- /dev/null
+++ b/testdata/integration/domain_interaction/book_ontology.osxml
@@ -0,0 +1,35 @@
+<?xml version="1.0" standalone="yes"?>
+<!-- The ontology node is the root node of a single ontology definition -->
+<ontology name="book">
+ <struct name="book" cardinality="{1}" root="true">
+ <field>
+ <childRef ref="book.chapter"/>
+ <childRef ref="book.paragraph"/>
+ </field>
+ </struct>
+ <struct name="chapter">
+ <field>
+ <childRef ref="book.section"/>
+ <childRef ref="book.paragraph"/>
+ </field>
+ </struct>
+ <struct name="section">
+ <field>
+ <childRef ref="book.subsection"/>
+ <childRef ref="book.paragraph"/>
+ </field>
+ </struct>
+ <struct name="subsection">
+ <field>
+ <childRef ref="book.paragraph"/>
+ </field>
+ </struct>
+ <struct name="paragraph" transparent="true">
+ <field>
+ <childRef ref="book.text"/>
+ </field>
+ </struct>
+ <struct name="text" transparent="true">
+ <primitive type="string"/>
+ </struct>
+</ontology>
diff --git a/testdata/integration/domain_interaction/comments_ontology.osxml b/testdata/integration/domain_interaction/comments_ontology.osxml
new file mode 100644
index 0000000..34185d8
--- /dev/null
+++ b/testdata/integration/domain_interaction/comments_ontology.osxml
@@ -0,0 +1,40 @@
+<?xml version="1.0" standalone="yes"?>
+<ontology name="comments">
+ <import rel="ontology" src="./book_ontology.osxml"/>
+
+ <!-- an annotation comment -->
+ <annotation name="comment">
+ <field name="replies" subtree="true">
+ <childRef ref="reply"/>
+ </field>
+ <field name="content">
+ <childRef ref="book.paragraph"/>
+ </field>
+ </annotation>
+
+ <!-- an point-like structure comment. -->
+ <struct name="comment">
+ <!-- Is there a chance to prevent users from having to redefine these
+ two fields in comment and reply? Could we use a fieldRef here?
+ Or would that be circular? -->
+ <field name="replies" subtree="true">
+ <childRef ref="reply"/>
+ </field>
+ <field name="content">
+ <childRef ref="book.paragraph"/>
+ </field>
+ <parentRef ref="book.paragraph">
+ <fieldRef ref="$default"/>
+ </parentRef>
+ </struct>
+ <!-- note that replies are organized in a tree fashion: One can also reply
+ to a reply -->
+ <struct name="reply">
+ <field name="replies" subtree="true">
+ <childRef ref="reply"/>
+ </field>
+ <field name="content">
+ <childRef ref="book.paragraph"/>
+ </field>
+ </struct>
+</ontology>
diff --git a/testdata/integration/domain_interaction/complex_book.in.osxml b/testdata/integration/domain_interaction/complex_book.in.osxml
new file mode 100644
index 0000000..8eb5f26
--- /dev/null
+++ b/testdata/integration/domain_interaction/complex_book.in.osxml
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<document>
+
+ <import rel="ontology" src="./book_ontology"/>
+ <import rel="ontology" src="./headings_ontology"/>
+ <import rel="ontology" src="./meta_ontology"/>
+ <import rel="ontology" src="./bibliography_ontology"/>
+ <import rel="ontology" src="./lists_ontology"/>
+ <import rel="ontology" src="./emphasis_ontology"/>
+ <import rel="ontology" src="./comments_ontology"/>
+ <!--<alias tag="paragraph" aka="p"/>
+ <alias tag="emphasized" aka="em"/>-->
+
+ <book>
+ <meta>
+ <primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <lastName>Kant</lastName>
+ <email>[ikant,philo.albertus-koenigsberg,de]</email>
+ <affiliation>[Logic and Metaphysics, Faculty of Philosophy, Albertus-University Königsberg]</affiliation>
+ </primaryAuthor>
+ <version>[1,0,0]</version>
+ </meta>
+
+ <bibliography>
+ <bibEntry>
+ <title>Dezember-Heft</title>
+ <journal>Berlinische Monatsschrift</journal>
+ <year>1784</year>
+ <pages>{481-494}</pages>
+ </bibEntry>
+ <bibEntry>
+ <title>Kleine Schriften</title>
+ <primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <lastName>Kant</lastName>
+ </primaryAuthor>
+ <year>1793</year>
+ <pages>{34-50}</pages>
+ <location>Neuwied</location>
+ </bibEntry>
+ <bibEntry>
+ <title>Zerstreute Aufsätze</title>
+ <primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <lastName>Kant</lastName>
+ </primaryAuthor>
+ <year>1793</year>
+ <pages>{25-37}</pages>
+ <location>Frankfurt und Leipzig</location>
+ </bibEntry>
+ <bibEntry>
+ <title>Sämmtliche kleine Schriften</title>
+ <primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <lastName>Kant</lastName>
+ </primaryAuthor>
+ <year>1798</year>
+ <pages>{159-172}</pages>
+ <location>Königsberg u. Leipzig</location>
+ </bibEntry>
+ <bibEntry>
+ <title>I. Kant's vermischte Schriften</title>
+ <primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <lastName>Kant</lastName>
+ </primaryAuthor>
+ <year>1799</year>
+ <pages>{687-700}</pages>
+ <location>Halle</location>
+ </bibEntry>
+ <bibEntry>
+ <title>Vorzügliche kleine Schriften und Aufsätze</title>
+ <primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <lastName>Kant</lastName>
+ </primaryAuthor>
+ <year>1833</year>
+ <pages>{75-84}</pages>
+ <location>Leipzig</location>
+ </bibEntry>
+ </bibliography>
+
+ <heading>
+ Beantwortung der Frage: Was ist Aufklärung?
+ </heading>
+
+ <chapter name="content">
+ <heading>Was ist Aufklärung?</heading>
+
+ <a:start:strong/>Aufklärung ist der Ausgang des Menschen aus seiner
+ selbstverschuldeten Unmündigkeit<a:end:strong/>.
+ <ul>
+ <item><a:start:emphasized/>Unmündigkeit<a:end:emphasized/> ist
+ das Unvermögen, sich seines Verstandes ohne Leitung eines anderen zu
+ bedienen.</item>
+ <item><a:start:emphasized/>Selbstverschuldet<a:end:emphasized/>
+ ist diese Unmündigkeit, wenn die Ursache derselben nicht am Mangel
+ des Verstandes, sondern der Entschließung und des Mutes liegt, sich
+ seiner ohne Leitung eines andern zu bedienen.</item>
+ </ul>
+ <a:start:strong/>Sapere aude!<a:end:strong/> Habe Mut, dich deines
+ eigenen Verstandes zu bedienen! ist also der Wahlspruch der
+ Aufklärung.
+ </chapter>
+ </book>
+</document>
diff --git a/testdata/integration/domain_interaction/complex_book.out.osxml b/testdata/integration/domain_interaction/complex_book.out.osxml
new file mode 100644
index 0000000..17c40d1
--- /dev/null
+++ b/testdata/integration/domain_interaction/complex_book.out.osxml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<document xmlns:bibliography="bibliography" xmlns:book="book" xmlns:comments="comments" xmlns:emphasis="emphasis" xmlns:headings="headings" xmlns:lists="lists" xmlns:meta="meta">
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/book_ontology.osxml"/>
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/headings_ontology.osxml"/>
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/meta_ontology.osxml"/>
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/bibliography_ontology.osxml"/>
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/lists_ontology.osxml"/>
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/emphasis_ontology.osxml"/>
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/comments_ontology.osxml"/>
+ <book:book>
+ <heading>
+ <headings:heading>
+ <book:text>Beantwortung der Frage: Was ist Aufklärung?</book:text>
+ </headings:heading>
+ </heading>
+ <meta>
+ <meta:meta>
+ <meta:authors>
+ <meta:primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <secondNames/>
+ <lastName>Kant</lastName>
+ <email>[
+ &quot;domainName&quot;= &quot;philo.albertus-koenigsberg&quot;,
+ &quot;domainSuffix&quot;= &quot;de&quot;,
+ &quot;local&quot;= &quot;ikant&quot;
+]</email>
+ <affiliation>[
+ &quot;departement&quot;= &quot;Faculty of Philosophy&quot;,
+ &quot;institution&quot;= &quot;Albertus-University Königsberg&quot;,
+ &quot;workgroup&quot;= &quot;Logic and Metaphysics&quot;
+]</affiliation>
+ </meta:primaryAuthor>
+ </meta:authors>
+ <meta:version>[
+ &quot;major&quot;= 1,
+ &quot;minor&quot;= 0,
+ &quot;patch&quot;= 0
+]</meta:version>
+ </meta:meta>
+ </meta>
+ <bibliography>
+ <bibliography:bibliography>
+ <bibliography:bibEntry>
+ <bibliography:title>Dezember-Heft</bibliography:title>
+ <bibliography:journal>Berlinische Monatsschrift</bibliography:journal>
+ <bibliography:year>1784</bibliography:year>
+ <bibliography:pages>{481-494}</bibliography:pages>
+ </bibliography:bibEntry>
+ <bibliography:bibEntry>
+ <bibliography:title>Kleine Schriften</bibliography:title>
+ <meta:authors>
+ <meta:primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <secondNames/>
+ <lastName>Kant</lastName>
+ <email/>
+ <affiliation/>
+ </meta:primaryAuthor>
+ </meta:authors>
+ <bibliography:year>1793</bibliography:year>
+ <bibliography:pages>{34-50}</bibliography:pages>
+ <bibliography:location>Neuwied</bibliography:location>
+ </bibliography:bibEntry>
+ <bibliography:bibEntry>
+ <bibliography:title>Zerstreute Aufsätze</bibliography:title>
+ <meta:authors>
+ <meta:primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <secondNames/>
+ <lastName>Kant</lastName>
+ <email/>
+ <affiliation/>
+ </meta:primaryAuthor>
+ </meta:authors>
+ <bibliography:year>1793</bibliography:year>
+ <bibliography:pages>{25-37}</bibliography:pages>
+ <bibliography:location>Frankfurt und Leipzig</bibliography:location>
+ </bibliography:bibEntry>
+ <bibliography:bibEntry>
+ <bibliography:title>Sämmtliche kleine Schriften</bibliography:title>
+ <meta:authors>
+ <meta:primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <secondNames/>
+ <lastName>Kant</lastName>
+ <email/>
+ <affiliation/>
+ </meta:primaryAuthor>
+ </meta:authors>
+ <bibliography:year>1798</bibliography:year>
+ <bibliography:pages>{159-172}</bibliography:pages>
+ <bibliography:location>Königsberg u. Leipzig</bibliography:location>
+ </bibliography:bibEntry>
+ <bibliography:bibEntry>
+ <bibliography:title>I. Kant&apos;s vermischte Schriften</bibliography:title>
+ <meta:authors>
+ <meta:primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <secondNames/>
+ <lastName>Kant</lastName>
+ <email/>
+ <affiliation/>
+ </meta:primaryAuthor>
+ </meta:authors>
+ <bibliography:year>1799</bibliography:year>
+ <bibliography:pages>{687-700}</bibliography:pages>
+ <bibliography:location>Halle</bibliography:location>
+ </bibliography:bibEntry>
+ <bibliography:bibEntry>
+ <bibliography:title>Vorzügliche kleine Schriften und Aufsätze</bibliography:title>
+ <meta:authors>
+ <meta:primaryAuthor>
+ <firstName>Immanuel</firstName>
+ <secondNames/>
+ <lastName>Kant</lastName>
+ <email/>
+ <affiliation/>
+ </meta:primaryAuthor>
+ </meta:authors>
+ <bibliography:year>1833</bibliography:year>
+ <bibliography:pages>{75-84}</bibliography:pages>
+ <bibliography:location>Leipzig</bibliography:location>
+ </bibliography:bibEntry>
+ </bibliography:bibliography>
+ </bibliography>
+ <book:chapter name="content">
+ <heading>
+ <headings:heading>
+ <book:text>Was ist Aufklärung?</book:text>
+ </headings:heading>
+ </heading>
+ <meta/>
+ <a:start:strong/>
+ <book:paragraph>
+ <heading/>
+ <book:text>Aufklärung ist der Ausgang des Menschen aus seiner selbstverschuldeten Unmündigkeit</book:text>
+ <a:end:strong/>
+ <book:text>.</book:text>
+ </book:paragraph>
+ <lists:ul>
+ <heading/>
+ <lists:item>
+ <a:start:emphasized/>
+ <book:text>Unmündigkeit</book:text>
+ <a:end:emphasized/>
+ <book:text>ist das Unvermögen, sich seines Verstandes ohne Leitung eines anderen zu bedienen.</book:text>
+ </lists:item>
+ <lists:item>
+ <a:start:emphasized/>
+ <book:text>Selbstverschuldet</book:text>
+ <a:end:emphasized/>
+ <book:text>ist diese Unmündigkeit, wenn die Ursache derselben nicht am Mangel des Verstandes, sondern der Entschließung und des Mutes liegt, sich seiner ohne Leitung eines andern zu bedienen.</book:text>
+ </lists:item>
+ </lists:ul>
+ <a:start:strong/>
+ <book:paragraph>
+ <heading/>
+ <book:text>Sapere aude!</book:text>
+ <a:end:strong/>
+ <book:text>Habe Mut, dich deines eigenen Verstandes zu bedienen! ist also der Wahlspruch der Aufklärung.</book:text>
+ </book:paragraph>
+ </book:chapter>
+ </book:book>
+</document>
diff --git a/testdata/integration/domain_interaction/email_typesystem.osxml b/testdata/integration/domain_interaction/email_typesystem.osxml
new file mode 100644
index 0000000..325f89a
--- /dev/null
+++ b/testdata/integration/domain_interaction/email_typesystem.osxml
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<typesystem name="email">
+ <struct name="email">
+ <field name="local" type="string"/>
+ <field name="domainName" type="string"/>
+ <field name="domainSuffix" type="string"/>
+ </struct>
+</typesystem>
diff --git a/testdata/integration/domain_interaction/emphasis_ontology.osxml b/testdata/integration/domain_interaction/emphasis_ontology.osxml
new file mode 100644
index 0000000..0fdd63a
--- /dev/null
+++ b/testdata/integration/domain_interaction/emphasis_ontology.osxml
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<ontology name="emphasis">
+ <annotation name="emphasized"/>
+ <annotation name="strong"/>
+</ontology>
diff --git a/testdata/integration/domain_interaction/headings_ontology.osxml b/testdata/integration/domain_interaction/headings_ontology.osxml
new file mode 100644
index 0000000..56c9e7d
--- /dev/null
+++ b/testdata/integration/domain_interaction/headings_ontology.osxml
@@ -0,0 +1,33 @@
+<?xml version="1.0" standalone="yes"?>
+<ontology name="headings">
+
+ <import rel="ontology" src="./book_ontology.osxml"/>
+
+ <struct name="heading" cardinality="1" transparent="true">
+ <!-- The parent mechanism is a curious thing. Remind yourself
+ that parent-child-relationship in this sense are mediated
+ by fields. So we must either reference a field that is
+ already there or declare a new one on the fly. -->
+ <parentRef ref="book.book">
+ <field name="heading" subtree="true" optional="true"/>
+ </parentRef>
+ <parentRef ref="book.chapter">
+ <field name="heading" subtree="true" optional="true"/>
+ </parentRef>
+ <parentRef ref="book.section">
+ <field name="heading" subtree="true" optional="true"/>
+ </parentRef>
+ <parentRef ref="book.subsection">
+ <field name="heading" subtree="true" optional="true"/>
+ </parentRef>
+ <parentRef ref="book.paragraph">
+ <field name="heading" subtree="true" optional="true"/>
+ </parentRef>
+ <!-- regarding its fields we have a problem here. We do not want to
+ declare a new field, because in fact we want to allow every
+ bit of content that a paragraph would allow - also considering
+ possible extensions of paragraph by other ontologies.
+ So we need to reference the default field of paragraph. -->
+ <fieldRef ref="book.paragraph.$default"/>
+ </struct>
+</ontology>
diff --git a/testdata/integration/domain_interaction/lists_ontology.osxml b/testdata/integration/domain_interaction/lists_ontology.osxml
new file mode 100644
index 0000000..c18494a
--- /dev/null
+++ b/testdata/integration/domain_interaction/lists_ontology.osxml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<ontology name="lists">
+ <import rel="ontology" src="./book_ontology"/>
+
+ <struct name="ul" isa="book.paragraph">
+ <!-- Here we solve the problem of parents using the isa
+ mechanism, because a list may occur whereever a paragraph
+ may occur. However we do want to override the default field. -->
+ <field>
+ <childRef ref="item"/>
+ </field>
+ </struct>
+ <struct name="ol" isa="book.paragraph">
+ <!-- Here we solve the problem of parents using the isa
+ mechanism, because a list may occur whereever a paragraph
+ may occur. However we do want to override the default field. -->
+ <field>
+ <childRef ref="item"/>
+ </field>
+ </struct>
+ <struct name="item">
+ <fieldRef ref="book.paragraph.$default"/>
+ </struct>
+</ontology>
diff --git a/testdata/integration/domain_interaction/meta_ontology.osxml b/testdata/integration/domain_interaction/meta_ontology.osxml
new file mode 100644
index 0000000..eb392ce
--- /dev/null
+++ b/testdata/integration/domain_interaction/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>
diff --git a/testdata/integration/domain_interaction/simple_annotation.in.osxml b/testdata/integration/domain_interaction/simple_annotation.in.osxml
new file mode 100644
index 0000000..c0f426a
--- /dev/null
+++ b/testdata/integration/domain_interaction/simple_annotation.in.osxml
@@ -0,0 +1,10 @@
+<?xml version="1.0" standalone="yes"?>
+<document>
+ <import rel="ontology" src="./book_ontology.osxml"/>
+ <import rel="ontology" src="./comments_ontology.osxml"/>
+
+ <book>
+ This is a <a:start:comment>This is not a nice test!</a:start:comment>test<a:end:comment/>.
+ </book>
+</document>
+
diff --git a/testdata/integration/domain_interaction/simple_annotation.out.osxml b/testdata/integration/domain_interaction/simple_annotation.out.osxml
new file mode 100644
index 0000000..f4999f6
--- /dev/null
+++ b/testdata/integration/domain_interaction/simple_annotation.out.osxml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<document xmlns:book="book" xmlns:comments="comments">
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/book_ontology.osxml"/>
+ <import rel="ontology" src="/home/bpaassen/GIT/ousia-src/testdata/integration/osxml/comments_ontology.osxml"/>
+ <book:book>
+ <book:paragraph>
+ <book:text>This is a</book:text>
+ <a:start:comment>
+ <replies/>
+ <book:paragraph>
+ <book:text>This is not a nice test!</book:text>
+ </book:paragraph>
+ </a:start:comment>
+ <book:text>test</book:text>
+ <a:end:comment/>
+ <book:text>.</book:text>
+ </book:paragraph>
+ </book:book>
+</document>
diff --git a/testdata/integration/domain_interaction/version_typesystem.osxml b/testdata/integration/domain_interaction/version_typesystem.osxml
new file mode 100644
index 0000000..0d52736
--- /dev/null
+++ b/testdata/integration/domain_interaction/version_typesystem.osxml
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<typesystem name="version">
+ <struct name="version">
+ <field name="major" type="int"/>
+ <field name="minor" type="int"/>
+ <field name="patch" type="int"/>
+ </struct>
+</typesystem>