<?xml version="1.0" encoding="UTF-8"?>
<grammar
	xmlns="http://relaxng.org/ns/structure/1.0"
	xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
	xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
>
	<start>
		<element name="office:document">
			<attribute name="office:version">
				<value>1.2</value>
			</attribute>
			<attribute name="office:mimetype">
				<data type="string"/>
			</attribute>
			<ref name="office-body"/>
		</element>
	</start>
	<define name="office-body">
		<element name="office:body">
			<element name="office:text">
				<element name="text:p">
					<zeroOrMore>
						<ref name="paragraph-content"/>
					</zeroOrMore>
				</element>
			</element>
		</element>
	</define>
	<define name="paragraph-content">
		<choice>
			<text/>
			<element name="text:conditional-text">
				<ref name="text-conditional-text-attlist"/>
				<text/>
			</element>
		</choice>
	</define>
	<define name="text-conditional-text-attlist">
		<interleave>
			<attribute name="text:condition">
				<data type="string"/>
			</attribute>
			<attribute name="text:string-value-if-true">
				<data type="string"/>
			</attribute>
			<attribute name="text:string-value-if-false">
				<data type="string"/>
			</attribute>
		</interleave>
	</define>
</grammar>
