diff options
| author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-04-08 12:20:19 +0200 | 
|---|---|---|
| committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:33 +0200 | 
| commit | 7a6c99c0b09377bca0b77d2918cf1e2092b3f59c (patch) | |
| tree | 582118cdb815c7d942c4b0ae9d94642e3ba01602 /testdata | |
| parent | 003d5e57f6f4c8996dcd9cdd03b61004307fd180 (diff) | |
refactored the more sophisticated OSXML parser tests to the integration test folder.
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/integration/osxml/affiliation_typesystem.osxml (renamed from testdata/osxmlparser/affiliation_typesystem.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/bibliography_ontology.osxml (renamed from testdata/osxmlparser/bibliography_ontology.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/book_ontology.osxml | 35 | ||||
| -rw-r--r-- | testdata/integration/osxml/comments_ontology.osxml | 40 | ||||
| -rw-r--r-- | testdata/integration/osxml/complex_book.osxml (renamed from testdata/osxmlparser/complex_book.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/email_typesystem.osxml (renamed from testdata/osxmlparser/email_typesystem.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/emphasis_ontology.osxml (renamed from testdata/osxmlparser/emphasis_ontology.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/headings_ontology.osxml | 33 | ||||
| -rw-r--r-- | testdata/integration/osxml/lists_ontology.osxml (renamed from testdata/osxmlparser/lists_ontology.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/meta_ontology.osxml (renamed from testdata/osxmlparser/meta_ontology.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/simple_annotation.osxml (renamed from testdata/osxmlparser/simple_annotation.osxml) | 0 | ||||
| -rw-r--r-- | testdata/integration/osxml/version_typesystem.osxml (renamed from testdata/osxmlparser/version_typesystem.osxml) | 0 | 
12 files changed, 108 insertions, 0 deletions
| diff --git a/testdata/osxmlparser/affiliation_typesystem.osxml b/testdata/integration/osxml/affiliation_typesystem.osxml index d84dc30..d84dc30 100644 --- a/testdata/osxmlparser/affiliation_typesystem.osxml +++ b/testdata/integration/osxml/affiliation_typesystem.osxml diff --git a/testdata/osxmlparser/bibliography_ontology.osxml b/testdata/integration/osxml/bibliography_ontology.osxml index 0333133..0333133 100644 --- a/testdata/osxmlparser/bibliography_ontology.osxml +++ b/testdata/integration/osxml/bibliography_ontology.osxml diff --git a/testdata/integration/osxml/book_ontology.osxml b/testdata/integration/osxml/book_ontology.osxml new file mode 100644 index 0000000..2c615ca --- /dev/null +++ b/testdata/integration/osxml/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/osxml/comments_ontology.osxml b/testdata/integration/osxml/comments_ontology.osxml new file mode 100644 index 0000000..34185d8 --- /dev/null +++ b/testdata/integration/osxml/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/osxmlparser/complex_book.osxml b/testdata/integration/osxml/complex_book.osxml index 8eb5f26..8eb5f26 100644 --- a/testdata/osxmlparser/complex_book.osxml +++ b/testdata/integration/osxml/complex_book.osxml diff --git a/testdata/osxmlparser/email_typesystem.osxml b/testdata/integration/osxml/email_typesystem.osxml index 325f89a..325f89a 100644 --- a/testdata/osxmlparser/email_typesystem.osxml +++ b/testdata/integration/osxml/email_typesystem.osxml diff --git a/testdata/osxmlparser/emphasis_ontology.osxml b/testdata/integration/osxml/emphasis_ontology.osxml index 0fdd63a..0fdd63a 100644 --- a/testdata/osxmlparser/emphasis_ontology.osxml +++ b/testdata/integration/osxml/emphasis_ontology.osxml diff --git a/testdata/integration/osxml/headings_ontology.osxml b/testdata/integration/osxml/headings_ontology.osxml new file mode 100644 index 0000000..56c9e7d --- /dev/null +++ b/testdata/integration/osxml/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/osxmlparser/lists_ontology.osxml b/testdata/integration/osxml/lists_ontology.osxml index c18494a..c18494a 100644 --- a/testdata/osxmlparser/lists_ontology.osxml +++ b/testdata/integration/osxml/lists_ontology.osxml diff --git a/testdata/osxmlparser/meta_ontology.osxml b/testdata/integration/osxml/meta_ontology.osxml index eb392ce..eb392ce 100644 --- a/testdata/osxmlparser/meta_ontology.osxml +++ b/testdata/integration/osxml/meta_ontology.osxml diff --git a/testdata/osxmlparser/simple_annotation.osxml b/testdata/integration/osxml/simple_annotation.osxml index c0f426a..c0f426a 100644 --- a/testdata/osxmlparser/simple_annotation.osxml +++ b/testdata/integration/osxml/simple_annotation.osxml diff --git a/testdata/osxmlparser/version_typesystem.osxml b/testdata/integration/osxml/version_typesystem.osxml index 0d52736..0d52736 100644 --- a/testdata/osxmlparser/version_typesystem.osxml +++ b/testdata/integration/osxml/version_typesystem.osxml | 
