diff options
Diffstat (limited to 'testdata/integration/osxml/comments_ontology.osxml')
-rw-r--r-- | testdata/integration/osxml/comments_ontology.osxml | 40 |
1 files changed, 40 insertions, 0 deletions
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> |