summaryrefslogtreecommitdiff
path: root/testdata/xmlparser/comments_domain.oxm
blob: 1336b47a2018bd4a16c7b2a9e2a9569283cedb4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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>