summaryrefslogtreecommitdiff
path: root/data/ontology/poem.osml
blob: 207582b10154016801953854dce829307f2b17c3 (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
%{
	Ontology usable for the description of poems.
}%
\begin{ontology#poem}
	\struct#poem[root=true]
		\primitive#title[type=string, subtree=true, optional=true]
		\primitive#author[type=string, subtree=true, optional=true]
		\primitive#year[type=int, subtree=true, optional=true]
		\field
			\childRef[ref=stanza]
			\childRef[ref=part]

	\struct#part
		\primitive#title[type=string, subtree=true, optional=true]
		\field
			\childRef[ref=stanza]

	\struct#stanza[transparent=true]
		\syntax
			\close{\paragraph}
		\field
			\childRef[ref=line]
			\childRef[ref=indentation]

	\struct#line[transparent=true]
		\syntax
			\close{\newline}
		\primitive[type=string]

	\struct#indentation
		\syntax
			\open{\indent}
			\close{\dedent}
		\field
			\childRef[ref=line]
			\childRef[ref=indentation]
\end{ontology}