diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-03-01 20:47:25 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-03-01 20:47:25 +0100 |
commit | a7019614896fdd3e29b9a28f6a8cfd2c1b365983 (patch) | |
tree | 8a9f102649e88ebf24de0a07cf5f348804a6212d /testdata/osxmlparser/headings_ontology.osxml | |
parent | 0d4ce5c555a1ba3a87cb9a1e350854eda7a243e1 (diff) |
Renamed domain to ontology.
Diffstat (limited to 'testdata/osxmlparser/headings_ontology.osxml')
-rw-r--r-- | testdata/osxmlparser/headings_ontology.osxml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testdata/osxmlparser/headings_ontology.osxml b/testdata/osxmlparser/headings_ontology.osxml new file mode 100644 index 0000000..413eaa9 --- /dev/null +++ b/testdata/osxmlparser/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" isSubtree="true" optional="true"/> + </parentRef> + <parentRef ref="book.chapter"> + <field name="heading" isSubtree="true" optional="true"/> + </parentRef> + <parentRef ref="book.section"> + <field name="heading" isSubtree="true" optional="true"/> + </parentRef> + <parentRef ref="book.subsection"> + <field name="heading" isSubtree="true" optional="true"/> + </parentRef> + <parentRef ref="book.paragraph"> + <field name="heading" isSubtree="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> |