diff options
author | Stef Walter <stef@memberwebs.com> | 2004-07-27 21:54:23 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-07-27 21:54:23 +0000 |
commit | 9eb4e30b344317c24a71c5e348ae368695d49d47 (patch) | |
tree | e38942b6738be543bc856560b9c566f956924b28 /doc/rtfx.xsd | |
parent | 61ff9cee67228fd5b430eb929687ca0cac992a7c (diff) |
- Documentation
Diffstat (limited to 'doc/rtfx.xsd')
-rw-r--r-- | doc/rtfx.xsd | 486 |
1 files changed, 486 insertions, 0 deletions
diff --git a/doc/rtfx.xsd b/doc/rtfx.xsd new file mode 100644 index 0000000..922b0a6 --- /dev/null +++ b/doc/rtfx.xsd @@ -0,0 +1,486 @@ +<?xml version="1.0"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://memberwebs.com/ns/rtfx/" + xmlns="http://memberwebs.com/ns/rtfx/" elementFormDefault="qualified"> + + <!-- + Copyright (c) 2004, Nate Nielsen + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the + above copyright notice, this list of conditions and + the following disclaimer in the documentation and/or + other materials provided with the distribution. + * The names of contributors to this software may not be + used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + + CONTRIBUTORS + Nate Nielsen <nielsen@memberwebs.com> + --> + + <xs:element name="document"> + <xs:annotation> + <xs:documentation>The entire RTF document.</xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="meta"/> + <xs:group ref="section"/> + <xs:group ref="block"/> + </xs:choice> + </xs:complexType> + </xs:element> + + + <!-- ################################################################## + DOCUMENT META INFO + --> + + <xs:group name="meta"> + <xs:annotation> + <xs:documentation>Tags that that contain data about the document and general formatting.</xs:documentation> + </xs:annotation> + + <xs:choice> + <xs:element ref="info" maxOccurs="1"/> + <xs:element ref="stylesheet" maxOccurs="1"/> + <xs:element ref="options" maxOccurs="1"/> + </xs:choice> + </xs:group> + + <xs:element name="stylesheet"> + <xs:annotation> + <xs:documentation>Contains a list of all the paragraph styles in the document, and their various formatting attributes.</xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="style"/> + </xs:choice> + </xs:complexType> + </xs:element> + + <xs:element name="style"> + <xs:annotation> + <xs:documentation>Represents a paragraph style used in the document.</xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:attribute name="name" type="xs:string"> + <xs:annotation> + <xs:documentation>The style name.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="bold" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Style text bold.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="hide" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Style text hidden.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="italic" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Style text italicized.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="strike" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Style text striken out.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="underline" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Style text underlined.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="color" type="xs:integer" default="0"> + <xs:annotation> + <xs:documentation>Style text color [NOTE: This attribute is only generated in 'presentation' mode].</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="face" type="xs:string"> + <xs:annotation> + <xs:documentation>Style font face [NOTE: This attribute is only generated in 'presentation' mode].</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="size" type="xs:string"> + <xs:annotation> + <xs:documentation>Style font size [NOTE: This attribute is only generated in 'presentation' mode].</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="info"> + <xs:annotation> + <xs:documentation>Document meta information.</xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:all> + <xs:element name="title" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:documentation>The document title.</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="author" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:documentation>The document author.</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="operator" type="xs:string" minOccurs="0"> + <xs:annotation> + <xs:documentation>The document operator.</xs:documentation> + </xs:annotation> + </xs:element> + </xs:all> + </xs:complexType> + </xs:element> + + <xs:element name="options"> + <xs:annotation> + <xs:documentation>Document options and defaults.</xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:all> + <xs:element ref="font" minOccurs="0"/> + </xs:all> + </xs:complexType> + </xs:element> + + + <!-- ################################################################## + SECTION CONTENT + --> + + <xs:group name="section"> + <xs:annotation> + <xs:documentation>Tags that break a document into various sections.</xs:documentation> + </xs:annotation> + + <xs:choice> + <xs:element ref="sect"/> + <xs:element ref="page"/> + <xs:element ref="footnote"/> + </xs:choice> + </xs:group> + + <xs:element name="sect"> + <xs:annotation> + <xs:documentation>A section break.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="page"> + <xs:annotation> + <xs:documentation>A 'hard' page break.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="footnote"> + <xs:annotation> + <xs:documentation>A footnote. Footnotes are all usually grouped together at the end of the document.</xs:documentation> + </xs:annotation> + + <xs:complexType mixed="true"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="block"/> + </xs:choice> + <xs:attribute name="id" type="xs:integer"> + <xs:annotation> + <xs:documentation>The footnote number.</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + + <!-- ################################################################## + BLOCK CONTENT + --> + + <xs:group name="block"> + <xs:annotation> + <xs:documentation>Block type elements.</xs:documentation> + </xs:annotation> + + <xs:choice> + <xs:element ref="para"/> + <xs:element ref="list"/> + <xs:element ref="table"/> + </xs:choice> + </xs:group> + + <xs:element name="para"> + <xs:annotation> + <xs:documentation>A paragraph. One of the main basic building blocks of the document. Basically all text and other 'inline' elements are contained in paragraphs.</xs:documentation> + </xs:annotation> + + <xs:complexType mixed="true"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="inline"/> + </xs:choice> + <xs:attribute name="style" type="xs:string"> + <xs:annotation> + <xs:documentation>The paragraph style name.</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="list"> + <xs:annotation> + <xs:documentation>A list. Lists contain paragraphs each of which is an item in the list.</xs:documentation> + </xs:annotation> + + <xs:complexType mixed="true"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="block"/> + </xs:choice> + + <xs:attribute name="ordered" type="xs:boolean"> + <xs:annotation> + <xs:documentation>Whether a numbered list or not.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="start" type="xs:integer"> + <xs:annotation> + <xs:documentation>For numbered lists the number to start at.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="type" default="disc"> + <xs:annotation> + <xs:documentation>The type of bullet or number on a list.</xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="arabic"/> + <xs:enumeration value="upper-roman"/> + <xs:enumeration value="lower-roman"/> + <xs:enumeration value="upper-alpha"/> + <xs:enumeration value="lower-alpha"/> + <xs:enumeration value="disc"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + </xs:complexType> + </xs:element> + + + <!-- ################################################################## + TABLE STRUCTURE + --> + + <xs:element name="table"> + <xs:annotation> + <xs:documentation>A table.</xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + + <xs:element name="row"> + <xs:annotation> + <xs:documentation>A row in a table.</xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + + <xs:element name="cell"> + <xs:annotation> + <xs:documentation>A cell in a table. Each cell can contain multiple paragraphs or other block elements.</xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="block"/> + </xs:choice> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + + + <!-- ################################################################## + INLINE CONTENT + --> + + <xs:complexType name="inline" mixed="true"> + <xs:annotation> + <xs:documentation>Inline elements flow with the text and/or change attributes in the text.</xs:documentation> + </xs:annotation> + + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="inline"/> + </xs:choice> + </xs:complexType> + + <xs:group name="inline"> + <xs:annotation> + <xs:documentation>Inline elements flow with the text and/or change attributes in the text.</xs:documentation> + </xs:annotation> + + <xs:choice> + <xs:element ref="b"/> + <xs:element ref="tab"/> + <xs:element ref="line"/> + <xs:element ref="hide"/> + <xs:element ref="i"/> + <xs:element ref="strike"/> + <xs:element ref="u"/> + <xs:element ref="super"/> + <xs:element ref="sub"/> + <xs:element ref="ref"/> + <xs:element ref="font"/> + </xs:choice> + </xs:group> + + <xs:element name="line"> + <xs:annotation> + <xs:documentation>A 'hard' line break.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="tab"> + <xs:annotation> + <xs:documentation>A tab.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="b" type="inline"> + <xs:annotation> + <xs:documentation>Contained text is bold.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="i" type="inline"> + <xs:annotation> + <xs:documentation>Contained text is italic.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="u" type="inline"> + <xs:annotation> + <xs:documentation>Contained text is underlined.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="strike" type="inline"> + <xs:annotation> + <xs:documentation>Contained text is striken out.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="super" type="inline"> + <xs:annotation> + <xs:documentation>Contained text is superscript.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="sub" type="inline"> + <xs:annotation> + <xs:documentation>Contained text is subscript.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="hide" type="inline"> + <xs:annotation> + <xs:documentation>Contained text is hidden.</xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="ref"> + <xs:annotation> + <xs:documentation>A reference to another part of the document such as a footnote.</xs:documentation> + </xs:annotation> + + <xs:complexType mixed="true"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="inline"/> + </xs:choice> + + <xs:attribute name="type" fixed="footnote"> + <xs:annotation> + <xs:documentation>The type of object this reference is pointing to. Currently only footnotes are supported.</xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="footnote"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="to" type="xs:string"> + <xs:annotation> + <xs:documentation>The identifier of the object this reference is pointing to.</xs:documentation> + </xs:annotation> + </xs:attribute> + + </xs:complexType> + </xs:element> + + <xs:element name="font"> + <xs:annotation> + <xs:documentation>Font information for contained text [NOTE: This tag is only generated in 'presentation' mode].</xs:documentation> + </xs:annotation> + + <xs:complexType mixed="true"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="inline"/> + </xs:choice> + <xs:attribute name="name" type="xs:string"> + <xs:annotation> + <xs:documentation>The name of the font.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="size" type="xs:integer"> + <xs:annotation> + <xs:documentation>The size of the font.</xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="color" type="xs:integer"> + <xs:annotation> + <xs:documentation>The color of the text.</xs:documentation> + </xs:annotation> + </xs:attribute> + + </xs:complexType> + </xs:element> + + +</xs:schema> |