summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2006-02-19 15:32:29 +0000
committerDaniel Veillard <veillard@src.gnome.org>2006-02-19 15:32:29 +0000
commit7933800926b9ee9b1352f043e6bc5539024354e6 (patch)
tree9aca804d4ec5e0e716933906264712e4f02bed02 /test
parent87254c8497f199ebecc7c98b1658c209d4a2328e (diff)
downloadlibxml2-7933800926b9ee9b1352f043e6bc5539024354e6.tar.gz
Added new regression tests for #331062, daniel
Diffstat (limited to 'test')
-rw-r--r--test/relaxng/OpenDocumentSub.rng229
-rw-r--r--test/relaxng/OpenDocumentSub_0.xml7
2 files changed, 236 insertions, 0 deletions
diff --git a/test/relaxng/OpenDocumentSub.rng b/test/relaxng/OpenDocumentSub.rng
new file mode 100644
index 00000000..161be66e
--- /dev/null
+++ b/test/relaxng/OpenDocumentSub.rng
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ OASIS OpenDocument v1.0
+ Relax-NG Schema
+
+ ** It's only a very small sub-set of the schema, meant for debugging text-notes-configuration element **
+-->
+
+<grammar
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
+
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
+
+ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+ xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+ xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+ xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+ xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+ xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+ xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
+ xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+ xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+ xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+ xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+ xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+ xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+ xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
+
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:math="http://www.w3.org/1998/Math/MathML"
+ xmlns:xforms="http://www.w3.org/2002/xforms"
+
+ xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+ xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+ xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
+>
+<define name="office-process-content">
+ <optional>
+ <attribute name="office:process-content" a:defaultValue="true">
+ <ref name="boolean"/>
+ </attribute>
+ </optional>
+</define>
+<start>
+ <choice>
+ <ref name="office-document-styles"/>
+ </choice>
+</start>
+<define name="office-document-styles">
+ <element name="office:document-styles">
+ <ref name="office-document-common-attrs"/>
+ <ref name="office-styles"/>
+ </element>
+</define>
+<define name="office-document-common-attrs" combine="interleave">
+ <optional>
+ <attribute name="office:version">
+ <ref name="string"/>
+ </attribute>
+ </optional>
+</define>
+<define name="office-styles">
+ <optional>
+ <element name="office:styles">
+ <interleave>
+ <zeroOrMore>
+ <ref name="text-notes-configuration"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </optional>
+</define>
+<define name="text-notes-configuration">
+ <element name="text:notes-configuration">
+ <ref name="text-notes-configuration-content"/>
+ </element>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <ref name="text-note-class"/>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <attribute name="text:citation-style-name">
+ <ref name="styleNameRef"/>
+ </attribute>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <attribute name="text:citation-body-style-name">
+ <ref name="styleNameRef"/>
+ </attribute>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <attribute name="text:default-style-name">
+ <ref name="styleNameRef"/>
+ </attribute>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <attribute name="text:master-page-name">
+ <ref name="styleNameRef"/>
+ </attribute>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <attribute name="text:start-value">
+ <ref name="nonNegativeInteger"/>
+ </attribute>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <ref name="common-num-format-prefix-suffix-attlist"/>
+ <optional>
+ <ref name="common-num-format-attlist"/>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <attribute name="text:start-numbering-at">
+ <choice>
+ <value>document</value>
+ <value>chapter</value>
+ <value>page</value>
+ </choice>
+ </attribute>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <attribute name="text:footnotes-position">
+ <choice>
+ <value>text</value>
+ <value>page</value>
+ <value>section</value>
+ <value>document</value>
+ </choice>
+ </attribute>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <element name="text:note-continuation-notice-forward">
+ <text/>
+ </element>
+ </optional>
+</define>
+<define name="text-notes-configuration-content" combine="interleave">
+ <optional>
+ <element name="text:note-continuation-notice-backward">
+ <text/>
+ </element>
+ </optional>
+</define>
+<define name="common-num-format-prefix-suffix-attlist" combine="interleave">
+ <optional>
+ <attribute name="style:num-prefix">
+ <ref name="string"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="style:num-suffix">
+ <ref name="string"/>
+ </attribute>
+ </optional>
+</define>
+<define name="common-num-format-attlist" combine="interleave">
+ <choice>
+ <attribute name="style:num-format">
+ <choice>
+ <value>1</value>
+ <value>i</value>
+ <value>I</value>
+ <ref name="string"/>
+ <empty/>
+ </choice>
+ </attribute>
+ <group>
+ <attribute name="style:num-format">
+ <choice>
+ <value>a</value>
+ <value>A</value>
+ </choice>
+ </attribute>
+ <ref name="style-num-letter-sync-attlist"/>
+ </group>
+ <empty/>
+ </choice>
+</define>
+<define name="style-num-letter-sync-attlist" combine="interleave">
+ <optional>
+ <attribute name="style:num-letter-sync">
+ <ref name="boolean"/>
+ </attribute>
+ </optional>
+</define>
+<define name="text-note-class">
+ <attribute name="text:note-class">
+ <choice>
+ <value>footnote</value>
+ <value>endnote</value>
+ </choice>
+ </attribute>
+</define>
+<define name="styleNameRef">
+ <choice>
+ <data type="NCName"/>
+ <empty/>
+ </choice>
+</define>
+<define name="nonNegativeInteger">
+ <data type="nonNegativeInteger"/>
+</define>
+<define name="boolean">
+ <choice>
+ <value>true</value>
+ <value>false</value>
+ </choice>
+</define>
+<define name="string">
+ <data type="string"/>
+</define>
+</grammar>
diff --git a/test/relaxng/OpenDocumentSub_0.xml b/test/relaxng/OpenDocumentSub_0.xml
new file mode 100644
index 00000000..9cfb1988
--- /dev/null
+++ b/test/relaxng/OpenDocumentSub_0.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document-styles xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" office:version="1.0">
+ <office:styles>
+ <text:notes-configuration text:note-class="endnote" style:num-format="1" text:start-value="0"/>
+ </office:styles>
+</office:document-styles>