OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Specification (Was: Style properties questions/requests)


Hi all,

David Faure wrote:

>Is there a version of the specification somewhere that is being updated
>with the changes decided here? Or will that only be done in the end,
>from the various meeting minutes?
>
Hah, thanks for bringing that up. The OpenOffice.org specification has 
not been updated for a while. It may yet happen, but I much prefer to 
put my time into the OASIS spec, as that is to supersede our own. The 
OpenOffice.org DTDs are usually up-to-date, as they are used for testing.

The idea was indeed to continously edit the TC's specification. That 
worked sort of OK until about, ehmm, May. I have admittedly been falling 
behind since then; I really want (and need) to spend some more time on 
it to catch up.

So, what's the current state? You'll find the current specification 
proposal at:
http://xml.openoffice.org/oasis/p-open-office-specification.xml

In the directory, you'll find two tools that may be of interest: One is 
the XSLT script 'extract.xsl', which you can use to extract all 
paragraphs that have been formatted using a certain style. I use this to 
extract the current Relax-NG specification for the format from the 
document (style 'RelaxNG'), and to obtain a list of  to-do items (style 
'TODO'). E.g. using xsltproc (from the libxml2 distribution), you can use
  xsltproc --stringparam style RelaxNG extract.xsl 
p-open-office-specification.xml
to get RelaxNG from the document.

The other files of interest is the ooo2oasis.xsl (and oasis2ooo.xsl), 
which is an XSLT script to generate an OASIS Open Office document from 
an OpenOffice.org one. Like the spec, it has only tracked changes to the 
text chapter, so it's far from complete. But I use it to generate our 
spec in our own format (rather than the OOo base format), and it's at 
least good enough to validate against the Relax-NG.


I have attached two documents: The Relax-NG (generated from the spec 
using extract.xsl), and a PDF version of the spec (generated by loading 
the spec into OOo and generating PDF from there). Obviously, the spec is 
rather incomplete, but I think it allows you to determine the direction 
is going to. TODO-items are marked with a red background, so they're 
hard to miss. :-)

I'd be happy if you all could have a look at it, and give feedback.

Sincerely,
Daniel

spec.pdf

<?xml version="1.0" encoding="UTF-8"?>
<!--
    OASIS Open Office format
    preliminary Relax-NG schema

    $Id: p-open-office-specification.xml,v 1.6 2003/05/06 16:01:30 dvo Exp $

    © 2002 OASIS Open
    © 1999-2002 Sun microsystems
-->

<grammar
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes";

    xmlns="http://relaxng.org/ns/structure/1.0";
    xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0";

    xmlns:office="http://openoffice.org/2000/office";
    xmlns:text="http://openoffice.org/2000/text";
    xmlns:table="http://openoffice.org/2000/table";

    xmlns:number="http://openoffice.org/2000/datastyle";
    xmlns:form="http://openoffice.org/2000/form";
    xmlns:dr3d="http://openoffice.org/2000/dr3d";
    xmlns:draw="http://openoffice.org/2000/drawing";
    xmlns:meta="http://openoffice.org/2000/meta";
    xmlns:chart="http://openoffice.org/2000/chart";
    xmlns:style="http://openoffice.org/2000/style";
    xmlns:presentation="http://openoffice.org/2001/presentation";
    xmlns:config="http://openoffice.org/2001/config";
    xmlns:script="http://openoffice.org/2000/script";

    xmlns:math="http://www.w3.org/1998/Math/MathML";
    xmlns:fo="http://www.w3.org/1999/XSL/Format";
    xmlns:xlink="http://www.w3.org/1999/xlink";
    xmlns:svg="http://www.w3.org/2000/svg";
    xmlns:dc="http://purl.org/dc/elements/1.1/";
>
<start>
    <choice>
        <ref name="office-document"/>
        <ref name="office-document-content"/>
        <ref name="office-document-styles"/>
        <ref name="office-document-meta"/>
        <ref name="office-document-settings"/>
    </choice>
</start>
<define name="office-document">
    <element name="office:document">
        <ref name="office-document-attrs"/>
        <ref name="office-meta"/>
        <ref name="office-settings"/>
        <ref name="office-script"/>
        <ref name="office-font-decls"/>
        <ref name="office-styles"/>
        <ref name="office-automatic-styles"/>
        <ref name="office-master-styles"/>
        <ref name="office-body"/>
    </element>
</define>
<define name="office-document-content">
    <element name="office:document-content">
        <ref name="office-document-attrs"/>
        <ref name="office-script"/>
        <ref name="office-font-decls"/>
        <ref name="office-automatic-styles"/>
        <ref name="office-body"/>
    </element>
</define>
<define name="office-document-styles">
    <element name="office:document-styles">
        <ref name="office-document-attrs"/>
        <ref name="office-font-decls"/>
        <ref name="office-styles"/>
        <ref name="office-automatic-styles"/>
        <ref name="office-master-styles"/>
    </element>
</define>
<define name="office-document-meta">
    <element name="office:document-meta">
        <ref name="office-document-attrs"/>
        <ref name="office-meta"/>
    </element>
</define>
<define name="office-document-settings">
    <element name="office:document-settings">
        <ref name="office-document-attrs"/>
        <ref name="office-settings"/>
    </element>
</define>
<define name="office-document-attrs">
    <optional>
        <attribute name="office:version">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="office-meta">
    <optional>
        <element name="office:meta">
            <zeroOrMore>
                <ref name="office-meta-data"/>
            </zeroOrMore>
        </element>
    </optional>
</define>
<define name="office-body">
    <element name="office:body">
        <ref name="office-body-content"/>
    </element>
</define>
<define name="office-body-content" combine="choice">
    <element name="office:text">
        <ref name="office-text-content-prelude"/>
        <zeroOrMore>
            <ref name="office-text-content-main"/>
        </zeroOrMore>
        <ref name="office-text-content-epilogue"/>
    </element>
</define>
<define name="office-text-content-prelude">
    <ref name="office-forms"/>
    <ref name="text-tracked-changes"/>
    <ref name="text-decls"/>
</define>
<define name="office-text-content-main">
    <choice>
        <ref name="text-h"/>
        <ref name="text-p"/>
        <ref name="text-list"/>
        <ref name="table-table"/>
        <ref name="draw-a"/>
        <ref name="text-section"/>
        <ref name="text-table-of-content"/>
        <ref name="text-illustration-index"/>
        <ref name="text-table-index"/>
        <ref name="text-object-index"/>
        <ref name="text-user-index"/>
        <ref name="text-alphabetical-index"/>
        <ref name="text-bibliography"/>
        <ref name="shape"/>
        <ref name="change-marks"/>
    </choice>
</define>
<define name="office-text-content-epilogue">
    <empty/>
</define>
<define name="text-decls">
    <optional>
        <element name="text:variable-decls">
            <zeroOrMore>
                <ref name="text-variable-decl"/>
            </zeroOrMore>
        </element>
    </optional>
    <optional>
        <element name="text:sequence-decls">
            <zeroOrMore>
                <ref name="text-sequence-decl"/>
            </zeroOrMore>
        </element>
    </optional>
    <optional>
        <element name="text:user-field-decls">
            <zeroOrMore>
                <ref name="text-user-field-decl"/>
            </zeroOrMore>
        </element>
    </optional>
    <optional>
        <element name="text:dde-connection-decls">
            <zeroOrMore>
                <ref name="text-dde-connection-decl"/>
            </zeroOrMore>
        </element>
    </optional>
<!-- TODO: What about alphabetical index mark auto file??? -->
    <optional>
        <element name="text:alphabetical-index-auto-mark-file">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="office-body-content" combine="choice">
    <element name="office:drawing">
        <ref name="anything"/>
    </element>
</define>
<define name="office-body-content" combine="choice">
    <element name="office:presentation">
        <ref name="anything"/>
    </element>
</define>
<define name="office-body-content" combine="choice">
    <element name="office:spreadsheet">
        <optional>
            <attribute name="table:structure-protected">
                <ref name="boolean"/>
            </attribute>
        </optional> 
        <ref name="anyContent"/>
    </element>
</define>
<define name="office-body-content" combine="choice">
    <element name="office:chart">
        <ref name="anything"/>
    </element>
</define>
<define name="office-body-content" combine="choice">
    <element name="office:image">
        <ref name="anything"/>
    </element>
</define>
<define name="office-settings">
    <optional>
        <element name="office:settings">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="office-script">
    <optional>
        <element name="office:script">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="office-font-decls">
    <optional>
        <element name="office:font-decls">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="office-styles">
    <optional>
        <element name="office:styles">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="office-automatic-styles">
    <optional>
        <element name="office:automatic-styles">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="office-master-styles">
    <optional>
        <element name="office:master-styles">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:generator">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="dc:title">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="dc:description">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="dc:subject">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:keyword">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:initial-creator">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="dc:creator">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:printed-by">
        <data type="string"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:creation-date">
        <ref name="dateTime"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="dc:date">
        <ref name="dateTime"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:print-date">
        <ref name="dateTime"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:template">
        <attribute name="xlink:href">
            <ref name="uriReference"/>
        </attribute>
        <optional>
            <attribute name="xlink:type">
                <value>simple</value>
            </attribute>
        </optional>
        <optional>
            <attribute name="xlink:actuate">
                <value>onRequest</value>
            </attribute>
        </optional>
        <optional>
            <attribute name="xlink:title">
                <data type="string"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:date">
                <ref name="dateTime"/>
            </attribute>
        </optional>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:auto-reload">
        <optional>
            <attribute name="xlink:type">
                <value>simple</value>
            </attribute>
        </optional>
        <optional>
            <attribute name="xlink:show">
                <value>replace</value>
            </attribute>
        </optional>
        <optional>
            <attribute name="xlink:actuate">
                <value>onLoad</value>
            </attribute>
        </optional>
        <optional>
            <attribute name="xlink:href">
                <ref name="uriReference"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:delay">
                <data type="duration"/>
            </attribute>
        </optional>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:hyperlink-behaviour">
        <optional>
            <attribute name="office:target-frame-name">
                <ref name="targetFrameName"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="xlink:show">
                <choice>
                    <value>new</value>
                    <value>replace</value>
                </choice>
            </attribute>
        </optional>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="dc:language">
        <ref name="cLanguage"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:editing-cycles">
        <data type="nonNegativeInteger"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:editing-duration">
        <data type="duration"/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:document-statistic">
        <optional>
            <attribute name="meta:page-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:table-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:draw-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:image-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:ole-object-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:paragraph-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:word-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:character-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:row-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:cell-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="meta:object-count">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <element name="meta:user-defined">
        <attribute name="meta:name">
            <data type="string"/>
        </attribute>
        <optional>
            <attribute name="meta:type">
                <data type="string"/>
            </attribute>
        </optional>
        <text/>
    </element>
</define>
<define name="office-meta-data" combine="choice">
    <ref name="foreignElement"/>
</define>
<define name="text-h">
    <element name="text:h">
        <attribute name="text:level">
            <data type="positiveInteger"/>
        </attribute>
        <ref name="paragraph-attrs"/>
        <zeroOrMore>
            <ref name="paragraph-content"/>
        </zeroOrMore>
    </element>
</define>
<define name="text-p">
    <element name="text:p">
        <ref name="paragraph-attrs"/>
        <zeroOrMore>
            <ref name="paragraph-content"/>
        </zeroOrMore>
    </element>
</define>
<define name="paragraph-attrs">
    <ref name="class-attrs"/>
    <optional>
        <attribute name="style:cond-style-name">
            <text/>
        </attribute>
    </optional>
</define>
<define name="text-list">
    <element name="text:list">
        <ref name="anything"/>
    </element>
</define>
<define name="text-section">
    <element name="text:section">
        <ref name="anyAttrs"/>
        <choice>
            <element name="text:section-source">
                <ref name="anything"/>
            </element>
            <element name="text:section-source-dde">
                <ref name="anything"/>
            </element>
            <empty/>
        </choice>
        <zeroOrMore>
            <ref name="office-text-content-main"/>
        </zeroOrMore>
    </element>
</define>
<define name="text-tracked-changes">
    <optional>
        <element name="text:tracked-changes">
            <ref name="anything"/>
        </element>
    </optional>
</define>

<define name="change-marks">
    <choice>
        <element name="text:change"><ref name="anything"/></element>
        <element name="text:change-start"><ref name="anything"/></element>
        <element name="text:change-end"><ref name="anything"/></element>
    </choice>
</define>
<define name="paragraph-content" combine="choice">
    <text/>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:s">
        <optional>
            <attribute name="text:c">
                <data type="nonNegativeInteger"/>
            </attribute>
        </optional>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:tab">
        <optional>
            <attribute name="text:tab-ref">
                <text/>
            </attribute>
        </optional>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:line-break">
        <empty/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:span">
        <ref name="class-attrs"/>
        <zeroOrMore>
            <ref name="paragraph-content"/>
        </zeroOrMore>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:a">
        <ref name="text-a-attlist"/>
        <optional>
            <ref name="office-events"/>
        </optional>
        <zeroOrMore>
            <ref name="paragraph-content"/>
        </zeroOrMore>
    </element>
</define>
<define name="text-a-attlist" combine="interleave">
    <optional>
        <attribute name="office:name">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="text-a-attlist" combine="interleave">
    <attribute name="xlink:href">
        <ref name="uriReference"/>
    </attribute>
    <optional>
        <attribute name="xlink:type">
            <value>simple</value>
        </attribute>
    </optional>
    <optional>
        <attribute name="xlink:actuate">
            <value>onRequest</value>
        </attribute>
    </optional>
</define>
<define name="text-a-attlist" combine="interleave">
    <optional>
        <attribute name="office:target-frame-name">
            <data type="string"/>
        </attribute>
    </optional>
    <optional>
        <attribute name="xlink:show">
            <choice>
                <value>new</value>
                <value>replace</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="text-a-attlist" combine="interleave">
    <optional>
        <attribute name="text:style-name">
            <ref name="styleName"/>
        </attribute>
    </optional>
    <optional>
        <attribute name="text:visited-style-name">
            <ref name="styleName"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <choice>
        <element name="text:bookmark">
            <attribute name="text:name">
                <data type="string"/>
            </attribute>
        </element>
        <element name="text:bookmark-start">
            <attribute name="text:name">
                <data type="string"/>
            </attribute>
        </element>
        <element name="text:bookmark-end">
            <attribute name="text:name">
                <data type="string"/>
            </attribute>
        </element>
    </choice>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:reference-mark">
        <attribute name="text:name">
            <data type="string"/>
        </attribute>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <choice>
        <element name="text:reference-mark-start">
            <attribute name="text:name">
                <data type="string"/>
            </attribute>
        </element>
        <element name="text:reference-mark-end">
            <attribute name="text:name">
                <data type="string"/>
            </attribute>
        </element>
    </choice>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:note">
        <ref name="text-note-class"/>
        <optional>
            <attribute name="text:id">
                <data type="string"/>
            </attribute>
        </optional>
        <element name="text:note-citation">
            <optional>
                <attribute name="text:label">
                    <data type="string"/>
                </attribute>
            </optional>
            <text/>
        </element>
<!-- Validity constraint: text:footnote and text:endnote elements may not 
    contain other text:footnote or text:endnote elements, even though the DTD
    allows this (via the %text; in the foot-/endnote-body).
    Unfortunatetly, this constraint cannot be easily specified in the DTD.
-->
        <element name="text:note-body">
            <zeroOrMore>
                <ref name="office-text-content-main"/>
            </zeroOrMore>
        </element>
    </element>
</define>
<define name="text-note-class">
    <attribute name="text:note-class">
        <choice>
            <value>footnote</value>
            <value>endnote</value>
        </choice>
    </attribute>
</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="styleName"/>
        </attribute>
    </optional>
</define>
<define name="text-notes-configuration-content" combine="interleave">
    <optional>
        <attribute name="text:citation-body-style-name">
            <ref name="styleName"/>
        </attribute>
    </optional>
</define>
<define name="text-notes-configuration-content" combine="interleave">
    <optional>
        <attribute name="text:default-style-name">
            <ref name="styleName"/>
        </attribute>
    </optional>
</define>
<define name="text-notes-configuration-content" combine="interleave">
    <optional>
        <attribute name="text:master-page-name">
            <ref name="styleName"/>
        </attribute>
    </optional>
</define>
<define name="text-notes-configuration-content" combine="interleave">
    <optional>
        <attribute name="text:start-value">
            <data type="nonNegativeInteger"/>
        </attribute>
    </optional>
</define>
<define name="text-notes-configuration-content" combine="interleave">
    <optional>
        <attribute name="style:num-prefix">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="text-notes-configuration-content" combine="interleave">
    <optional>
        <attribute name="style:num-suffix">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="text-notes-configuration-content" combine="interleave">
    <optional>
        <ref name="field-num-format"/>
    </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>document</value>
                <value>page</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="paragraph-content" combine="choice">
    <element name="text:ruby">
        <optional>
            <attribute name="text:style-name">
                <ref name="styleName"/>
            </attribute>
        </optional>
        <element name="text:ruby-base">
            <ref name="paragraph-content"/>
        </element>
        <element name="text:ruby-text">
            <optional>
                <attribute name="text:style-name">
                    <ref name="styleName"/>
                </attribute>
            </optional>
            <text/>
        </element>
    </element>
</define>
<define name="ruby-style" combine="interleave">
    <optional>
        <attribute name="style:ruby-position">
            <choice>
                <value>above</value>
                <value>below</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="ruby-style" combine="interleave">
    <optional>
        <attribute name="style:ruby-align">
            <choice>
                <value>left</value>
                <value>center</value>
                <value>right</value>
                <value>distribute-letter</value>
                <value>distribute-space</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <ref name="office-annotation"/>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:bibliography-mark">
        <ref name="anything"/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element>
        <choice>
            <name>text:alphabetical-index-mark</name>
            <name>text:alphabetical-index-mark-start</name>
            <name>text:alphabetical-index-mark-end</name>
            <name>text:user-index-mark</name>
            <name>text:user-index-mark-start</name>
            <name>text:user-index-mark-end</name>
            <name>text:toc-mark</name>
            <name>text:toc-mark-start</name>
            <name>text:toc-mark-end</name>
        </choice>
        <ref name="anything"/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <ref name="change-marks"/>
</define>
<define name="paragraph-content" combine="choice">
    <ref name="shape"/>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:date">
        <ref name="text-date-attlist"/>
        <text/>
    </element>
</define>
<define name="text-date-attlist" combine="interleave">
    <interleave>
        <ref name="field-fixed"/>
        <ref name="field-data-style-name"/>
    </interleave>
</define>
<define name="text-date-attlist" combine="interleave">
    <optional>
        <attribute name="text:date-value">
            <ref name="dateTime"/>
        </attribute>
    </optional>
</define>
<define name="text-date-attlist" combine="interleave">
    <optional>
        <attribute name="text:date-adjust">
            <data type="duration"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:time">
        <ref name="text-time-attlist"/>
        <text/>
    </element>
</define>
<define name="text-time-attlist" combine="interleave">
    <interleave>
        <ref name="field-fixed"/>
        <ref name="field-data-style-name"/>
    </interleave>
</define>
<define name="text-time-attlist" combine="interleave">
    <optional>
        <attribute name="text:time-value">
            <ref name="dateTime"/>
        </attribute>
    </optional>
</define>
<define name="text-time-attlist" combine="interleave">
    <optional>
        <attribute name="text:time-adjust">
            <data type="duration"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:page-number">
        <ref name="text-page-number-attlist"/>
        <text/>
    </element>
</define>
<define name="text-page-number-attlist" combine="interleave">
    <interleave>
        <ref name="field-num-format"/>
        <ref name="field-fixed"/>
    </interleave>
</define>
<define name="text-page-number-attlist" combine="interleave">
    <optional>
        <attribute name="text:page-adjust">
            <data type="integer"/>
        </attribute>
    </optional>
</define>
<define name="text-page-number-attlist" combine="interleave">
    <optional>
        <attribute name="text:select-page">
            <choice>
                <value>previous</value>
                <value>current</value>
                <value>next</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:page-continuation">
        <ref name="text-page-continuation-attlist"/>
        <text/>
    </element>
</define>
<define name="text-page-continuation-attlist" combine="interleave">
    <attribute name="text:select-page">
        <choice>
            <value>previous</value>
            <value>next</value>
        </choice>
    </attribute>
</define>
<define name="text-page-continuation-attlist" combine="interleave">
    <optional>
        <attribute name="text:string-value">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-firstname">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-lastname">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-initials">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-title">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-position">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-email">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-phone-private">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-fax">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-company">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-phone-work">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-street">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-city">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-postal-code">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-country">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sender-state-or-province">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:author-name">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:author-initials">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:chapter">
        <ref name="text-chapter-attlist"/>
        <text/>
    </element>
</define>
<define name="text-chapter-attlist" combine="interleave">
    <attribute name="text:display">
        <choice>
            <value>name</value>
            <value>number</value>
            <value>number-and-name</value>
            <value>plain-number-and-name</value>
            <value>plain-number</value>
        </choice>
    </attribute>
</define>
<define name="text-chapter-attlist" combine="interleave">
    <attribute name="text:outline-level">
        <data type="nonNegativeInteger"/>
    </attribute>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:file-name">
        <ref name="text-file-name-attlist"/>
        <text/>
    </element>
</define>
<define name="text-file-name-attlist" combine="interleave">
    <optional>
        <attribute name="text:display">
            <choice>
                <value>full</value>
                <value>path</value>
                <value>name</value>
                <value>name-and-extension</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="text-file-name-attlist" combine="interleave">
    <ref name="field-fixed"/>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:template-name">
        <ref name="text-template-name-attlist"/>
        <text/>
    </element>
</define>
<define name="text-template-name-attlist">
    <optional>
        <attribute name="text:display">
            <choice>
                <value>full</value>
                <value>path</value>
                <value>name</value>
                <value>name-and-extension</value>
                <value>area</value>
                <value>title</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="text-variable-decl">
    <element name="text:variable-decl">
        <ref name="field-name"/>
        <ref name="field-value-type"/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:variable-set">
        <interleave>
            <ref name="field-name"/>
            <ref name="field-formula"/>
            <ref name="field-value-and-type"/>
            <ref name="field-display-value-none"/>
            <ref name="field-data-style-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:variable-get">
        <interleave>
            <ref name="field-name"/>
            <ref name="field-display-value-formula"/>
            <ref name="field-data-style-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:variable-input">
        <interleave>
            <ref name="field-name"/>
            <ref name="field-description"/>
            <ref name="field-value-type"/>
            <ref name="field-display-value-none"/>
            <ref name="field-data-style-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="text-user-field-decl">
    <element name="text:user-field-decl">
        <ref name="field-name"/>
        <optional>
            <ref name="field-formula"/>
        </optional>
        <ref name="field-value-and-type"/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:user-field-get">
        <interleave>
            <ref name="field-name"/>
            <ref name="field-display-value-formula-none"/>
            <ref name="field-data-style-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:user-field-input">
        <interleave>
            <ref name="field-name"/>
            <ref name="field-description"/>
            <ref name="field-data-style-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="text-sequence-decl">
    <element name="text:sequence-decl">
        <ref name="text-sequence-decl-attlist"/>
    </element>
</define>
<define name="text-sequence-decl-attlist" combine="interleave">
    <ref name="field-name"/>
</define>
<define name="text-sequence-decl-attlist" combine="interleave">
    <attribute name="text:display-outline-level">
        <data type="nonNegativeInteger"/>
    </attribute>
</define>
<define name="text-sequence-decl-attlist" combine="interleave">
    <optional>
        <attribute name="text:separation-character">
            <ref name="character"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sequence">
        <interleave>
            <ref name="field-name"/>
            <ref name="field-formula"/>
            <ref name="field-num-format"/>
            <ref name="text-sequence-ref-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="text-sequence-ref-name">
    <optional>
        <attribute name="text:ref-name">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:expression">
        <interleave>
            <ref name="field-formula"/>
            <optional>
                <ref name="field-value-and-type"/>
            </optional>
            <ref name="field-display-value-formula"/>
            <ref name="field-data-style-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:text-input">
        <ref name="field-description"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:initial-creator">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:creation-date">
        <interleave>
            <ref name="field-fixed"/>
            <ref name="field-data-style-name"/>
            <optional>
                <attribute name="text:date-value">
                    <data type="date"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:creation-time">
        <interleave>
            <ref name="field-fixed"/>
            <ref name="field-data-style-name"/>
            <optional>
                <attribute name="text:time-value">
                    <ref name="dateTime"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:description">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:user-defined">
        <interleave>
            <ref name="field-fixed"/>
            <attribute name="text:name">
                <data type="string"/>
            </attribute>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:print-time">
        <interleave>
            <ref name="field-fixed"/>
            <ref name="field-data-style-name"/>
            <optional>
                <attribute name="text:time-value">
                    <data type="time"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:print-date">
        <interleave>
            <ref name="field-fixed"/>
            <ref name="field-data-style-name"/>
            <optional>
                <attribute name="text:date-value">
                    <data type="date"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:printed-by">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:title">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:subject">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:keywords">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:editing-cycles">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:editing-duration">
        <interleave>
            <ref name="field-fixed"/>
            <ref name="field-data-style-name"/>
            <optional>
                <attribute name="text:duration">
                    <data type="duration"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:modification-time">
        <interleave>
            <ref name="field-fixed"/>
            <ref name="field-data-style-name"/>
            <optional>
                <attribute name="text:time-value">
                    <data type="time"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:modification-date">
        <interleave>
            <ref name="field-fixed"/>
            <ref name="field-data-style-name"/>
            <optional>
                <attribute name="text:date-value">
                    <data type="date"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:creator">
        <ref name="field-fixed"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element>
        <choice>
            <name>text:page-count</name>
            <name>text:paragraph-count</name>
            <name>text:word-count</name>
            <name>text:character-count</name>
            <name>text:table-count</name>
            <name>text:image-count</name>
            <name>text:object-count</name>
        </choice>
        <ref name="field-num-format"/>
        <text/>
    </element>
</define>
<define name="field-database-table">
    <interleave>
        <attribute name="text:database-name">
            <data type="string"/>
        </attribute>
        <attribute name="text:table-name">
            <data type="string"/>
        </attribute>
        <optional>
            <attribute name="text:table-type">
                <choice>
                    <value>table</value>
                    <value>query</value>
                    <value>command</value>
                </choice>
            </attribute>
        </optional>
    </interleave>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:database-display">
        <ref name="text-database-display-attlist"/>
        <text/>
    </element>
</define>
<define name="text-database-display-attlist" combine="interleave">
    <ref name="field-database-table"/>
</define>
<define name="text-database-display-attlist" combine="interleave">
    <ref name="field-data-style-name"/>
</define>
<define name="text-database-display-attlist" combine="interleave">
    <attribute name="text:column-name">
        <data type="string"/>
    </attribute>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:database-next">
        <ref name="text-database-next-attlist"/>
    </element>
</define>
<define name="text-database-next-attlist" combine="interleave">
    <ref name="field-database-table"/>
</define>
<define name="text-database-next-attlist" combine="interleave">
    <optional>
        <attribute name="text:condition">
            <ref name="formula"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:database-row-select">
        <ref name="text-database-row-select-attlist"/>
    </element>
</define>
<define name="text-database-row-select-attlist" combine="interleave">
    <ref name="field-database-table"/>
</define>
<define name="text-database-row-select-attlist" combine="interleave">
    <optional>
        <attribute name="text:condition">
            <ref name="formula"/>
        </attribute>
    </optional>
</define>
<define name="text-database-row-select-attlist" combine="interleave">
    <optional>
        <attribute name="text:row-number">
            <data type="nonNegativeInteger"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:database-row-number">
        <interleave>
            <ref name="field-database-table"/>
            <ref name="field-num-format"/>
            <optional>
                <attribute name="text:value">
                    <data type="nonNegativeInteger"/>
                </attribute>
            </optional>
        </interleave>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:database-name">
        <ref name="field-database-table"/>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:page-variable-set">
        <ref name="text-set-page-variable-attlist"/>
        <text/>
    </element>
</define>
<define name="text-set-page-variable-attlist" combine="interleave">
    <optional>
        <attribute name="text:active">
            <ref name="boolean"/>
        </attribute>
    </optional>
</define>
<define name="text-set-page-variable-attlist" combine="interleave">
    <optional>
        <attribute name="text:page-adjust">
            <data type="integer"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:page-variable-get">
        <ref name="text-get-page-variable-attlist"/>
        <text/>
    </element>
</define>
<define name="text-get-page-variable-attlist" combine="interleave">
    <ref name="field-num-format"/>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:placeholder">
        <ref name="text-placeholder-attlist"/>
        <text/>
    </element>
</define>
<define name="text-placeholder-attlist" combine="interleave">
    <attribute name="text:placeholder-type">
        <choice>
            <value>text</value>
            <value>table</value>
            <value>text-box</value>
            <value>image</value>
            <value>object</value>
        </choice>
    </attribute>
</define>
<define name="text-placeholder-attlist" combine="interleave">
    <ref name="field-description"/>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:conditional-text">
        <ref name="text-conditional-text-attlist"/>
        <text/>
    </element>
</define>
<define name="text-conditional-text-attlist" combine="interleave">
    <attribute name="text:condition">
        <ref name="formula"/>
    </attribute>
</define>
<define name="text-conditional-text-attlist" combine="interleave">
    <attribute name="text:string-value-if-true">
        <data type="string"/>
    </attribute>
</define>
<define name="text-conditional-text-attlist" combine="interleave">
    <attribute name="text:string-value-if-false">
        <data type="string"/>
    </attribute>
</define>
<define name="text-conditional-text-attlist" combine="interleave">
    <optional>
        <attribute name="text:current-value">
            <ref name="boolean"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:hidden-text">
        <ref name="text-hidden-text-attlist"/>
        <text/>
    </element>
</define>
<define name="text-hidden-text-attlist" combine="interleave">
    <attribute name="text:condition">
        <ref name="formula"/>
    </attribute>
</define>
<define name="text-hidden-text-attlist" combine="interleave">
    <attribute name="text:string-value">
        <data type="string"/>
    </attribute>
</define>
<define name="text-hidden-text-attlist" combine="interleave">
    <optional>
        <attribute name="text:is-hidden">
            <ref name="boolean"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element>
        <choice>
            <name>text:reference-ref</name>
            <name>text:bookmark-ref</name>
            <name>text:note-ref</name>
        </choice>
        <interleave>
            <ref name="text-common-ref-content"/>
            <ref name="text-ref-content"/>
        </interleave>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:sequence-ref">
        <interleave>
            <ref name="text-common-ref-content"/>
            <ref name="text-sequence-ref-content"/>
        </interleave>
    </element>
</define>
<define name="text-common-ref-content" combine="interleave">
    <text/>
</define>
<define name="text-common-ref-content" combine="interleave">
    <optional>
        <attribute name="text:ref-name">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="text-ref-content" combine="interleave">
    <optional>
        <attribute name="text:reference-format">
            <choice>
                <value>page</value>
                <value>chapter</value>
                <value>direction</value>
                <value>text</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="text-sequence-ref-content" combine="interleave">
    <optional>
        <attribute name="text:reference-format">
            <choice>
                <value>page</value>
                <value>chapter</value>
                <value>direction</value>
                <value>text</value>
                <value>category-and-value</value>
                <value>caption</value>
                <value>value</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:script">
        <interleave>
            <choice>
                <attribute name="text:href">
                    <ref name="URL"/>
                </attribute>
                <text/>
            </choice>
            <optional>
                <attribute name="script:language">
                    <data type="string"/>
                </attribute>
            </optional>
        </interleave>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:execute-macro">
        <optional>
            <attribute name="text:name">
                <data type="string"/>
            </attribute>
        </optional>
        <optional>
            <ref name="office-events"/>
        </optional>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:hidden-paragraph">
        <ref name="text-hidden-paragraph-attlist"/>
        <text/>
    </element>
</define>
<define name="text-hidden-paragraph-attlist" combine="interleave">
    <attribute name="text:condition">
        <ref name="formula"/>
    </attribute>
</define>
<define name="text-hidden-paragraph-attlist" combine="interleave">
    <optional>
        <attribute name="text:is-hidden">
            <ref name="boolean"/>
        </attribute>
    </optional>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:dde-connection">
        <attribute name="text:connection-name">
            <data type="string"/>
        </attribute>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:measure">
        <attribute name="text:kind">
            <choice>
                <value>value</value>
                <value>unit</value>
                <value>gap</value>
            </choice>
        </attribute>
        <text/>
    </element>
</define>
<define name="paragraph-content" combine="choice">
    <element name="text:table-formula">
        <interleave>
            <ref name="field-formula"/>
            <ref name="field-display-value-formula"/>
            <ref name="field-data-style-name"/>
        </interleave>
        <text/>
    </element>
</define>
<define name="field-value-type">
    <attribute name="text:value-type">
        <choice>
            <value>float</value>
            <value>time</value>
            <value>date</value>
            <value>percentage</value>
            <value>currency</value>
            <value>boolean</value>
            <value>string</value>
        </choice>
    </attribute>
</define>
<define name="field-value-and-type">
    <choice>
        <group>
            <attribute name="text:value-type">
                <value>float</value>
            </attribute>
            <attribute name="text:value">
                <data type="double"/>
            </attribute>
        </group>
        <group>
            <attribute name="text:value-type">
                <value>percentage</value>
            </attribute>
            <attribute name="text:value">
                <data type="double"/>
            </attribute>
        </group>
        <group>
            <attribute name="text:value-type">
                <value>currency</value>
            </attribute>
            <attribute name="text:value">
                <data type="double"/>
            </attribute>
            <optional>
                <attribute name="text:currency">
                    <data type="string"/>
                </attribute>
            </optional>
        </group>
        <group>
            <attribute name="text:value-type">
                <value>date</value>
            </attribute>
            <attribute name="text:date-value">
                <data type="date"/>
            </attribute>
        </group>
        <group>
            <attribute name="text:value-type">
                <value>time</value>
            </attribute>
            <attribute name="text:time-value">
                <data type="duration"/>
            </attribute>
        </group>
        <group>
            <attribute name="text:value-type">
                <value>boolean</value>
            </attribute>
            <attribute name="text:boolean-value">
                <ref name="boolean"/>
            </attribute>
        </group>
        <group>
            <attribute name="text:value-type">
                <value>string</value>
            </attribute>
            <optional>
                <attribute name="text:string-value">
                    <data type="string"/>
                </attribute>
            </optional>
        </group>
    </choice>
</define>
<define name="field-fixed">
    <optional>
        <attribute name="text:fixed">
            <ref name="boolean"/>
        </attribute>
    </optional>
</define>
<define name="field-name">
    <attribute name="text:name">
        <ref name="variable-name"/>
    </attribute>
</define>
<define name="field-description">
    <optional>
        <attribute name="text:description">
            <text/>
        </attribute>
    </optional>
</define>
<define name="field-display-value-none">
    <optional>
        <attribute name="text:display">
            <choice>
                <value>value</value>
                <value>none</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="field-display-value-formula-none">
    <optional>
        <attribute name="text:display">
            <choice>
                <value>value</value>
                <value>formula</value>
                <value>none</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="field-display-value-formula">
    <optional>
        <attribute name="text:display">
            <choice>
                <value>value</value>
                <value>formula</value>
            </choice>
        </attribute>
    </optional>
</define>
<define name="field-formula">
    <optional>
        <attribute name="text:formula">
            <ref name="formula"/>
        </attribute>
    </optional>
</define>
<define name="field-data-style-name">
    <optional>
        <attribute name="style:data-style-name">
            <ref name="styleName"/>
        </attribute>
    </optional>
</define>
<define name="field-num-format">
    <choice>
        <attribute name="style:num-format">
            <choice>
                <value>1</value>
                <value>i</value>
                <value>I</value>
            </choice>
        </attribute>
        <group>
            <attribute name="style:num-format">
                <choice>
                    <value>a</value>
                    <value>A</value>
                </choice>
            </attribute>
            <optional>
                <attribute name="style:num-letter-sync">
                    <ref name="boolean"/>
                </attribute>
            </optional>
        </group>
        <empty/>
    </choice>
</define>
<define name="text-table-of-content">
    <element name="text:table-of-content">
        <ref name="anyAttrs"/>
        <element name="text:table-of-content-source">
            <ref name="anything"/>
        </element>
        <ref name="text-index-body"/>
    </element>
</define>

<define name="text-illustration-index">
    <element name="text:illustration-index">
        <ref name="anyAttrs"/>
        <element name="text:illustration-index-source">
            <ref name="anything"/>
        </element>
        <ref name="text-index-body"/>
    </element>
</define>

<define name="text-table-index">
    <element name="text:table-index">
        <ref name="anyAttrs"/>
        <element name="text:table-index-source">
            <ref name="anything"/>
        </element>
        <ref name="text-index-body"/>
    </element>
</define>

<define name="text-object-index">
    <element name="text:object-index">
        <ref name="anyAttrs"/>
        <element name="text:object-index-source">
            <ref name="anything"/>
        </element>
        <ref name="text-index-body"/>
    </element>
</define>

<define name="text-user-index">
    <element name="text:user-index">
        <ref name="anyAttrs"/>
        <element name="text:user-index-source">
            <ref name="anything"/>
        </element>
        <ref name="text-index-body"/>
    </element>
</define>

<define name="text-alphabetical-index">
    <element name="text:alphabetical-index">
        <ref name="anyAttrs"/>
        <element name="text:alphabetical-index-source">
            <ref name="anything"/>
        </element>
        <ref name="text-index-body"/>
    </element>
</define>

<define name="text-bibliography">
    <element name="text:bibliography">
        <ref name="anyAttrs"/>
        <element name="text:bibliography-source">
            <ref name="anything"/>
        </element>
        <ref name="text-index-body"/>
    </element>
</define>

<define name="text-index-body">
    <element name="text:index-body">
        <ref name="anything"/>
    </element>
</define>
<define name="table-table">
    <element name="table:table">
        <ref name="anything"/>
    </element>
</define>
<define name="office-forms">
    <optional>
        <element name="office:forms">
            <ref name="anything"/>
        </element>
    </optional>
</define>
<define name="draw-a">
    <element name="draw:a">
        <ref name="anything"/>
    </element>
</define>
<define name="shape">
    <element>
        <choice>
            <name>draw:rect</name>
            <name>draw:line</name>
            <name>draw:polyline</name>
            <name>draw:polygon</name>
            <name>draw:path</name>
            <name>draw:circle</name>
            <name>draw:ellipse</name>
            <name>draw:g</name>
            <name>draw:page-thumbnail</name>
            <name>draw:text-box</name>
            <name>draw:image</name>
            <name>draw:object</name>
            <name>draw:object-ole</name>
            <name>draw:applet</name>
            <name>draw:floating-frame</name>
            <name>draw:plugin</name>
            <name>draw:measure</name>
            <name>draw:caption</name>
            <name>draw:connector</name>
            <name>chart:chart</name>
            <name>dr3d:scene</name>
            <name>draw:control</name>
            <name>draw:a</name>
        </choice>
        <ref name="anything"/>
    </element>
</define>
<define name="office-annotation">
    <element name="office:annotation">
        <ref name="office-annotation-info"/>
        <zeroOrMore>
            <ref name="text-p"/>
        </zeroOrMore>
    </element>
</define>
<define name="office-annotation-info" combine="interleave">
    <optional>
        <attribute name="office:author">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="office-annotation-info" combine="interleave">
    <optional>
        <attribute name="office:create-date">
            <ref name="dateTime"/>
        </attribute>
    </optional>
</define>
<define name="office-annotation-info" combine="interleave">
    <optional>
        <attribute name="office:create-date-string">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="office-annotation-info" combine="interleave">
    <optional>
        <attribute name="office:display">
            <ref name="boolean"/>
        </attribute>
    </optional>
</define>
<define name="office-events">
    <element name="office:events">
        <ref name="anything"/>
    </element>
</define>
<!-- to avoid inclusion of the complete MathML schema, we will simply allow
     anything within a math:math top-level element
-->
<define name="math-math">
    <element name="math:math">
        <ref name="anything"/>
    </element>
</define>
<define name="text-dde-connection-decl">
    <element name="text:dde-connection-decl">
        <ref name="text-dde-connection-decl-attlist"/>
    </element>
</define>
<define name="text-dde-connection-decl-attlist" combine="interleave">
    <attribute name="text:name">
        <data type="string"/>
    </attribute>
</define>
<define name="text-dde-connection-decl-attlist" combine="interleave">
    <attribute name="office:dde-application">
        <data type="string"/>
    </attribute>
</define>
<define name="text-dde-connection-decl-attlist" combine="interleave">
    <attribute name="office:dde-topic">
        <data type="string"/>
    </attribute>
</define>
<define name="text-dde-connection-decl-attlist" combine="interleave">
    <attribute name="office:dde-item">
        <data type="string"/>
    </attribute>
</define>
<define name="text-dde-connection-decl-attlist" combine="interleave">
    <optional>
        <attribute name="office:automatic-update">
            <data type="string"/>
        </attribute>
    </optional>
</define>
<define name="class-attrs">
    <optional>
        <attribute name="text:style-name">
            <text/>
        </attribute>
    </optional>
    <optional>
        <attribute name="text:class-name">
<!-- what is the actual type of the class attributes? They contain a sequence of reference, right? -->
            <text/>
        </attribute>
    </optional>
    <optional>
        <attribute name="text:cond-style-name">
            <text/>
        </attribute>
    </optional>
</define>



<!--
the content definitions from the base format: Here only for reference while editing; this is to be deleted for the final spec.
<define name="office-text-prelude">
    <optional>
        <ref name="office.forms"/>
    </optional>
    <optional>
        <choice>
            <ref name="text.tracked-changes"/>
            <ref name="table.tracked-changes"/>
        </choice>
    </optional>
    <ref name="text-decls"/>
    <optional>
        <ref name="table.calculation-settings"/>
    </optional>
    <optional>
        <ref name="table.content-validations"/>
    </optional>
    <optional>
        <ref name="table.label-ranges"/>
    </optional>
</define>
<define name="office-text-content">
    <zeroOrMore>
        <choice>
            <ref name="text.h"/>
            <ref name="text.p"/>
            <ref name="text.ordered-list"/>
            <ref name="text.unordered-list"/>
            <ref name="table.table"/>
            <ref name="draw.page"/>
            <ref name="draw.a"/>
            <ref name="shape"/>
            <ref name="text.section"/>
            <ref name="text.table-of-content"/>
            <ref name="text.illustration-index"/>
            <ref name="text.table-index"/>
            <ref name="text.object-index"/>
            <ref name="text.user-index"/>
            <ref name="text.alphabetical-index"/>
            <ref name="text.bibliography"/>
            <ref name="change-marks"/>
        </choice>
    </zeroOrMore>
</define>
<define name="office-text-epilogue">
    <optional>
        <ref name="table.named-expressions"/>
    </optional>
    <optional>
        <ref name="table.database-ranges"/>
    </optional>
    <optional>
        <ref name="table.data-pilot-tables"/>
    </optional>
    <optional>
        <ref name="table.consolidation"/>
    </optional>
    <optional>
        <ref name="table.dde-links"/>
    </optional>
    <optional>
        <ref name="presentation.settings"/>
    </optional>
</define>
-->



<define name="boolean">
    <choice>
        <value>true</value>
        <value>false</value>
    </choice>
</define>
<define name="dateTime">
    <choice>
        <data type="date"/>
        <data type="dateTime"/>
    </choice>
</define>
<define name="foreignAttribute">
    <attribute>
        <anyName/>
        <text/>
    </attribute>
</define>
<define name="foreignElement">
    <element>
        <anyName/>
        <zeroOrMore>
            <choice>
                <ref name="foreignAttribute"/>
                <ref name="foreignElement"/>
                <text/>
            </choice>
        </zeroOrMore>
    </element>
</define>


<!-- these should be replaced by proper data types along the way -->
<define name="targetFrameName"><text/></define>
<define name="uriReference"><text/></define>
<define name="cLanguage"><text/></define>
<define name="styleName"><text/></define>
<define name="formula"><text/></define>
<define name="variable-name"><text/></define>
<define name="character"><text/></define>
<define name="URL"><text/></define>

<!-- anything, anyContent: use as a placeholder for items not yet defined. The
     committee draft specification should not contain any references to
     'anything' and 'anyContent' any more.
-->
<define name="anything">
    <zeroOrMore>
        <choice>
            <attribute>
                <anyName/>
                <text/>
            </attribute>
            <element>
                <anyName/>
                <ref name="anything"/>
            </element>
            <text/>
        </choice>
    </zeroOrMore>
</define>
<define name="anyElement">
    <element>
        <anyName/>
        <ref name="anything"/>
    </element>
</define>
<define name="anyContent">
    <zeroOrMore>
        <choice>
            <element>
                <anyName/>
                <ref name="anything"/>
            </element>
            <text/>
        </choice>
    </zeroOrMore>
</define>
<define name="anyAttrs">
    <zeroOrMore>
        <attribute>
            <anyName/>
            <text/>
        </attribute>
    </zeroOrMore>
</define>


</grammar>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]