mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Added new regression tests for #331062, daniel
This commit is contained in:
parent
87254c8497
commit
7933800926
0
result/relaxng/OpenDocumentSub_0
Normal file
0
result/relaxng/OpenDocumentSub_0
Normal file
1
result/relaxng/OpenDocumentSub_0.err
Normal file
1
result/relaxng/OpenDocumentSub_0.err
Normal file
@ -0,0 +1 @@
|
||||
./test/relaxng/OpenDocumentSub_0.xml validates
|
1
result/relaxng/OpenDocumentSub_err
Normal file
1
result/relaxng/OpenDocumentSub_err
Normal file
@ -0,0 +1 @@
|
||||
./test/relaxng/OpenDocumentSub.rng validates
|
0
result/relaxng/OpenDocumentSub_valid
Normal file
0
result/relaxng/OpenDocumentSub_valid
Normal file
229
test/relaxng/OpenDocumentSub.rng
Normal file
229
test/relaxng/OpenDocumentSub.rng
Normal file
@ -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>
|
7
test/relaxng/OpenDocumentSub_0.xml
Normal file
7
test/relaxng/OpenDocumentSub_0.xml
Normal file
@ -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>
|
Loading…
x
Reference in New Issue
Block a user