diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-04 22:00:43 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-02-04 22:00:43 +0100 |
commit | 0cfb5a4e1edbc164fc674a98ee8d788c821fbc39 (patch) | |
tree | d75d508b63677c0e2fe2a5d2a8dcbfa5e3bebd27 /testdata/xmlparser/comments_domain.oxm | |
parent | 0ff4b8bbd46c1561490aeacf3814d1678fb8d403 (diff) |
got annotation parsing to work with the comments domain. detected a bug, though (or better said: A conceptual problem)
Diffstat (limited to 'testdata/xmlparser/comments_domain.oxm')
-rw-r--r-- | testdata/xmlparser/comments_domain.oxm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testdata/xmlparser/comments_domain.oxm b/testdata/xmlparser/comments_domain.oxm new file mode 100644 index 0000000..1336b47 --- /dev/null +++ b/testdata/xmlparser/comments_domain.oxm @@ -0,0 +1,40 @@ +<?xml version="1.0" standalone="yes"?> +<domain name="comments"> + <import rel="domain" src="./book_domain.oxm"/> + + <!-- an annotation comment --> + <annotation name="comment"> + <field name="content" isSubtree="true"> + <child ref="book.paragraph"/> + </field> + <field name="replies" isSubtree="true"> + <child ref="reply"/> + </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="content" isSubtree="true"> + <child ref="book.paragraph"/> + </field> + <field name="replies" isSubtree="true"> + <child ref="reply"/> + </field> + <parent name="book.paragraph"> + <fieldRef name="$default"/> + </parent> + </struct> + <!-- note that replies are organized in a tree fashion: One can also reply + to a reply --> + <struct name="reply"> + <field name="content" isSubtree="true"> + <child ref="book.paragraph"/> + </field> + <field name="replies" isSubtree="true"> + <child ref="reply"/> + </field> + </struct> +</domain> |