Warning, /office/calligra/filters/sheets/gnumeric/gnumeric.xsd is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
0003             xmlns:gmr="http://www.gnumeric.org/v10.dtd"
0004             targetNamespace="http://www.gnumeric.org/v10.dtd"
0005             elementFormDefault="qualified"
0006             attributeFormDefault="unqualified">
0007 
0008     <xsd:annotation>
0009         <xsd:documentation xml:lang="en">
0010             Schema for gnumeric spreadsheet documents
0011             Assumes Gnumeric 1.2.2, updated for 1.4.2 in Feb 2005
0012             Based on gnumeric source code and sample gnumeric documents
0013             Author: Marc Johnson (marc_johnson27591@hotmail.com)
0014         </xsd:documentation>
0015     </xsd:annotation>
0016     
0017     <xsd:element name="Workbook" type="gmr:Workbook"/>
0018 
0019     <xsd:complexType name="Version">
0020         <xsd:attribute name="Epoch"  type="xsd:positiveInteger" use="required"/>
0021         <xsd:attribute name="Major"  type="xsd:positiveInteger" use="required"/>
0022         <xsd:attribute name="Minor"  type="xsd:positiveInteger" use="required"/>
0023         <xsd:attribute name="Full"   type="xsd:string"      use="required"/>
0024     </xsd:complexType>
0025 
0026     <xsd:complexType name="Workbook">
0027         <xsd:sequence>
0028             <xsd:element name="Version"         type="gmr:Version" minOccurs="0" maxOccurs="1"/>
0029             <xsd:element name="Attributes"      type="gmr:Attributes"/>
0030             <xsd:element name="Summary"         type="gmr:Summary"/>
0031 
0032             <!-- ancient files lack this, modern files require it -->
0033             <xsd:element name="SheetNameIndex"  type="gmr:SheetNameIndex" minOccurs="0" maxOccurs="1"/>
0034 
0035             <xsd:element name="Names"           type="gmr:Names" minOccurs="0" maxOccurs="1"/>
0036             <!-- preferred height and width -->
0037             <xsd:element name="Geometry">
0038                 <xsd:complexType>
0039                     <xsd:attribute name="Width"  type="xsd:positiveInteger" use="required"/>
0040                     <xsd:attribute name="Height" type="xsd:positiveInteger" use="required"/>
0041                 </xsd:complexType>
0042             </xsd:element>
0043             <xsd:element name="Sheets"         type="gmr:Sheets"/>
0044             <!-- which sheet was selected when the spreadsheet was saved? -->
0045             <xsd:element name="UIData">
0046                 <xsd:complexType>
0047                     <xsd:attribute name="SelectedTab" type="xsd:nonNegativeInteger" use="required"/>
0048                 </xsd:complexType>
0049             </xsd:element>
0050             <xsd:element name="Calculation" minOccurs="0" maxOccurs="1">
0051                 <xsd:complexType>
0052                     <xsd:attribute name="ManualRecalc"          type="xsd:boolean"/>
0053                     <xsd:attribute name="EnableIteration"       type="xsd:boolean"/>
0054                     <xsd:attribute name="MaxIterations"         type="xsd:nonNegativeInteger"/>
0055                     <xsd:attribute name="IterationTolerance"    type="xsd:double"/>
0056                 </xsd:complexType>
0057             </xsd:element>
0058         </xsd:sequence>
0059         <!-- version number should be v10 - - &gt;
0060         <xsd:attribute name="gmr" type="gmr:namespace" use="required"/> -->
0061     </xsd:complexType>
0062 <!--    
0063     <xsd:simpleType name="namespace">
0064         <xsd:restriction base="xsd:string">
0065             <xsd:pattern value="http://www.gnome.org/gnumeric/v\d+"/>
0066         </xsd:restriction>
0067     </xsd:simpleType>
0068 -->
0069 
0070     <xsd:complexType name="Attributes">
0071         <xsd:sequence>
0072             <xsd:element name="Attribute" minOccurs="0" maxOccurs="unbounded">
0073                 <xsd:complexType>
0074                     <xsd:sequence>
0075                         <!-- typical values of name include
0076                              WorkbookView::show_horizontal_scrollbar
0077                              WorkbookView::show_vertical_scrollbar
0078                              WorkbookView::show_notebook_tabs
0079                         -->
0080                         <xsd:element name="type"  type="gmr:GtkType"/>
0081                         <xsd:element name="name"  type="xsd:string"/>
0082                         <xsd:element name="value" type="xsd:string"/>
0083                     </xsd:sequence>
0084                 </xsd:complexType>
0085             </xsd:element>
0086         </xsd:sequence>
0087     </xsd:complexType>
0088 
0089     <xsd:complexType name="Names">
0090         <xsd:sequence>
0091             <xsd:element name="Name" minOccurs="0" maxOccurs="unbounded">
0092                 <xsd:complexType>
0093                     <xsd:sequence>
0094                         <!-- an oversight in the sax exporter (fixed in 1.4.3)
0095                              leaves off the namespace.  Handle both formats.
0096                           -->
0097                         <xsd:choice>
0098                             <xsd:element name="name"    type="xsd:string"/>
0099                             <xsd:element name="name"    type="xsd:string" form="unqualified"/>
0100                         </xsd:choice>
0101                         <xsd:choice>
0102                             <xsd:element name="value"   type="xsd:string"/>
0103                             <xsd:element name="value"   type="xsd:string" form="unqualified"/>
0104                         </xsd:choice>
0105                         <xsd:choice>
0106                             <xsd:element name="position" type="xsd:string"/>
0107                             <xsd:element name="position" type="xsd:string" form="unqualified"/>
0108                         </xsd:choice>
0109                     </xsd:sequence>
0110                 </xsd:complexType>
0111             </xsd:element>
0112         </xsd:sequence>
0113     </xsd:complexType>
0114 
0115 
0116     <xsd:simpleType name="GtkType">
0117         <!-- values of GtkType come from the GTK library; here is a list of known values:
0118               0 = INVALID
0119               1 = NONE
0120               2 = CHAR
0121               3 = UCHAR
0122               4 = BOOL
0123               5 = INT
0124               6 = UINT
0125               7 = LONG
0126               8 = ULONG
0127               9 = FLOAT
0128              10 = DOUBLE
0129              11 = STRING
0130              12 = ENUM
0131              13 = FLAGS
0132              14 = BOXED
0133              15 = POINTER
0134              16 = SIGNAL
0135              17 = ARGS
0136              18 = CALLBACK
0137              19 = C_CALLBACK
0138              20 = FOREIGN
0139              21 = OBJECT
0140         -->
0141         <xsd:restriction base="xsd:integer">
0142             <xsd:minInclusive value="0"/>
0143             <xsd:maxInclusive value="21"/>
0144         </xsd:restriction>
0145     </xsd:simpleType>
0146 
0147     <xsd:complexType name="Summary">
0148         <xsd:sequence>
0149             <xsd:element name="Item" minOccurs="0" maxOccurs="unbounded">
0150                 <xsd:complexType>
0151                     <xsd:sequence>
0152                         <!-- typical values of name include
0153                              application
0154                              author
0155                         -->
0156                         <xsd:element name="name"       type="xsd:string"/>
0157                         <!-- val-string for name="application" is always "gnumeric" -->
0158                         <xsd:element name="val-string" type="xsd:string"/>
0159                     </xsd:sequence>
0160                 </xsd:complexType>
0161             </xsd:element>
0162         </xsd:sequence>
0163     </xsd:complexType>
0164 
0165     <!-- this element may go away some day; the code documents it as an
0166          artifact, a work-around for a problem with the SAX-based parser
0167     -->
0168     <xsd:complexType name="SheetNameIndex">
0169         <xsd:sequence>
0170             <xsd:element name="SheetName" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
0171         </xsd:sequence>
0172     </xsd:complexType>
0173 
0174     <xsd:complexType name="Sheets">
0175         <xsd:sequence>
0176             <xsd:element name="Sheet" minOccurs="0" maxOccurs="unbounded">
0177                 <xsd:complexType>
0178                     <xsd:sequence>
0179                         <!-- name of the sheet -->
0180                         <xsd:element name="Name"             type="xsd:string"/>
0181                         <!-- maximum column used -->
0182                         <xsd:element name="MaxCol"           type="xsd:positiveInteger" minOccurs="0" maxOccurs="1"/>
0183                         <!-- maximum row used -->
0184                         <xsd:element name="MaxRow"           type="xsd:positiveInteger" minOccurs="0" maxOccurs="1"/>
0185                         <!-- most recently used zoom factor -->
0186                         <xsd:element name="Zoom"             type="xsd:double"/>
0187                         <xsd:element name="Names"            type="gmr:Names" minOccurs="0" maxOccurs="1"/>
0188                         <xsd:element name="PrintInformation" type="gmr:PrintInformation"/>
0189                         <xsd:element name="Styles"           type="gmr:Styles"/>
0190                         <xsd:element name="Cols">
0191                             <xsd:complexType>
0192                                 <xsd:sequence>
0193                                     <xsd:element name="ColInfo" type="gmr:Col_Row" minOccurs="0" maxOccurs="unbounded"/>
0194                                 </xsd:sequence>
0195                                 <xsd:attribute name="DefaultSizePts" type="xsd:double" use="required"/>
0196                             </xsd:complexType>
0197                         </xsd:element>
0198                         <xsd:element name="Rows">
0199                             <xsd:complexType>
0200                                 <xsd:sequence>
0201                                     <xsd:element name="RowInfo" type="gmr:Col_Row" minOccurs="0" maxOccurs="unbounded"/>
0202                                 </xsd:sequence>
0203                                 <xsd:attribute name="DefaultSizePts" type="xsd:double" use="required"/>
0204                             </xsd:complexType>
0205                         </xsd:element>
0206                         <xsd:element name="Selections"      type="gmr:Selections"/>
0207                         <xsd:element name="Objects"         type="gmr:Objects" minOccurs="0" maxOccurs="1"/>
0208                         <xsd:element name="Cells"           type="gmr:Cells"/>
0209                         <xsd:element name="MergedRegions"   type="gmr:MergedRegions" minOccurs="0" maxOccurs="1"/>
0210                         <xsd:element name="SheetLayout"     type="gmr:SheetLayout"/>
0211                         <xsd:element name="Solver"          type="gmr:Solver"/>
0212                     </xsd:sequence>
0213                         <!-- note: xsd:boolean values can be true, false, 1, 0;
0214                              gnumeric, in this element, always generates 'true' or
0215                              'false' for its attributes
0216                         -->
0217                     <xsd:attribute name="DisplayFormulas"     type="xsd:boolean" use="required"/>
0218                     <xsd:attribute name="HideZero"            type="xsd:boolean" use="required"/>
0219                     <xsd:attribute name="HideGrid"            type="xsd:boolean" use="required"/>
0220                     <xsd:attribute name="HideColHeader"       type="xsd:boolean" use="required"/>
0221                     <xsd:attribute name="HideRowHeader"       type="xsd:boolean" use="required"/>
0222                     <xsd:attribute name="DisplayOutlines"     type="xsd:boolean" use="required"/>
0223                     <xsd:attribute name="OutlineSymbolsBelow" type="xsd:boolean" use="required"/>
0224                     <xsd:attribute name="OutlineSymbolsRight" type="xsd:boolean" use="required"/>
0225                     <xsd:attribute name="TabColor"            type="gmr:color"   use="optional"/>
0226                 </xsd:complexType>
0227             </xsd:element>
0228         </xsd:sequence>
0229     </xsd:complexType>
0230 
0231     <xsd:complexType name="PrintInformation">
0232         <xsd:sequence>
0233             <xsd:element name="Margins">
0234                 <xsd:complexType>
0235                     <xsd:sequence>
0236                         <xsd:element name="top"    type="gmr:margin"/>
0237                         <xsd:element name="bottom" type="gmr:margin"/>
0238                         <xsd:element name="left"   type="gmr:margin"/>
0239                         <xsd:element name="right"  type="gmr:margin"/>
0240                         <xsd:element name="header" type="gmr:margin"/>
0241                         <xsd:element name="footer" type="gmr:margin"/>
0242                     </xsd:sequence>
0243                 </xsd:complexType>
0244             </xsd:element>
0245             <xsd:element name="Scale">
0246                 <xsd:complexType>
0247                     <xsd:attribute name="type" type="xsd:string" use="required"/>
0248                     <xsd:attribute name="percentage" type="xsd:double" use="optional"/>
0249                     <xsd:attribute name="cols" type="xsd:integer" />
0250                     <xsd:attribute name="rows" type="xsd:integer" />
0251                 </xsd:complexType>
0252             </xsd:element>
0253             <!-- center vertically? -->
0254             <xsd:element name="vcenter">
0255                 <xsd:complexType>
0256                     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
0257                 </xsd:complexType>
0258             </xsd:element>
0259             <!-- center horizontally? -->
0260             <xsd:element name="hcenter">
0261                 <xsd:complexType>
0262                     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
0263                 </xsd:complexType>
0264             </xsd:element>
0265             <!-- print grid lines? -->
0266             <xsd:element name="grid">
0267                 <xsd:complexType>
0268                     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
0269                 </xsd:complexType>
0270             </xsd:element>
0271             <!-- print even if only styles? -->
0272             <xsd:element name="even_if_only_styles">
0273                 <xsd:complexType>
0274                     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
0275                 </xsd:complexType>
0276             </xsd:element>
0277             <!-- print in monochrome? -->
0278             <xsd:element name="monochrome">
0279                 <xsd:complexType>
0280                     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
0281                 </xsd:complexType>
0282             </xsd:element>
0283             <!-- print in draft mode? -->
0284             <xsd:element name="draft">
0285                 <xsd:complexType>
0286                     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
0287                 </xsd:complexType>
0288             </xsd:element>
0289             <!-- print titles? -->
0290             <xsd:element name="titles">
0291                 <xsd:complexType>
0292                     <xsd:attribute name="value" type="xsd:boolean" use="required"/>
0293                 </xsd:complexType>
0294             </xsd:element>
0295 
0296             <!-- repeat range -->
0297             <xsd:element name="repeat_top" minOccurs="0" maxOccurs="1">
0298                 <xsd:complexType>
0299                     <xsd:attribute name="value" type="xsd:string" use="required"/>
0300                 </xsd:complexType>
0301             </xsd:element>
0302             <!-- repeat range -->
0303             <xsd:element name="repeat_left" minOccurs="0" maxOccurs="1">
0304                 <xsd:complexType>
0305                     <xsd:attribute name="value" type="xsd:string" use="required"/>
0306                 </xsd:complexType>
0307             </xsd:element>
0308             <xsd:element name="order"       type="gmr:print_ordering"/>
0309             <xsd:element name="orientation" type="gmr:print_orientation"/>
0310             <xsd:element name="Header">
0311                 <xsd:complexType>
0312                     <xsd:attribute name="Left"   type="xsd:string" use="required"/>
0313                     <xsd:attribute name="Middle" type="xsd:string" use="required"/>
0314                     <xsd:attribute name="Right"  type="xsd:string" use="required"/>
0315                 </xsd:complexType>
0316             </xsd:element>
0317             <xsd:element name="Footer">
0318                 <xsd:complexType>
0319                     <xsd:attribute name="Left"   type="xsd:string" use="required"/>
0320                     <xsd:attribute name="Middle" type="xsd:string" use="required"/>
0321                     <xsd:attribute name="Right"  type="xsd:string" use="required"/>
0322                 </xsd:complexType>
0323             </xsd:element>
0324             <!-- typical values are A4, US-Letter -->
0325             <xsd:element name="paper"       type="xsd:string" minOccurs="0" maxOccurs="1"/>
0326 
0327         </xsd:sequence>
0328     </xsd:complexType>
0329 
0330     <xsd:complexType name="margin">
0331         <xsd:attribute name="Points"   type="xsd:double"/>
0332         <xsd:attribute name="PrefUnit" type="gmr:print_units"/>
0333     </xsd:complexType>
0334     
0335     <xsd:simpleType name="print_units">
0336         <xsd:restriction base="xsd:string">
0337             <xsd:enumeration value="mm"/>
0338             <xsd:enumeration value="cm"/>
0339             <xsd:enumeration value="in"/>
0340             <xsd:enumeration value="Pt"/>
0341             <xsd:enumeration value="Px"/>
0342             <xsd:enumeration value="points"/>
0343         </xsd:restriction>
0344     </xsd:simpleType>
0345 
0346     <xsd:simpleType name="print_ordering">
0347         <xsd:restriction base="xsd:string">
0348             <!-- right, then down -->
0349             <xsd:enumeration value="r_then_d"/>
0350             <!-- down, then right -->
0351             <xsd:enumeration value="d_then_r"/>
0352         </xsd:restriction>
0353     </xsd:simpleType>
0354 
0355     <xsd:simpleType name="print_orientation">
0356         <xsd:restriction base="xsd:string">
0357             <xsd:enumeration value="landscape"/>
0358             <xsd:enumeration value="portrait"/>
0359         </xsd:restriction>
0360     </xsd:simpleType>
0361 
0362     <xsd:complexType name="Styles">
0363         <xsd:sequence>
0364             <xsd:element name="StyleRegion" minOccurs="0" maxOccurs="unbounded">
0365                 <xsd:complexType>
0366                     <xsd:sequence>
0367                         <xsd:element name="Style" type="gmr:Style" minOccurs="1" maxOccurs="1"/>
0368                     </xsd:sequence>
0369                     <xsd:attribute name="startCol" type="xsd:nonNegativeInteger" use="required"/>
0370                     <xsd:attribute name="startRow" type="xsd:nonNegativeInteger" use="required"/>
0371                     <xsd:attribute name="endCol"   type="xsd:nonNegativeInteger" use="required"/>
0372                     <xsd:attribute name="endRow"   type="xsd:nonNegativeInteger" use="required"/>
0373                 </xsd:complexType>
0374             </xsd:element>
0375         </xsd:sequence>
0376     </xsd:complexType>
0377 
0378     <xsd:complexType name="Style">
0379         <xsd:sequence>
0380             <xsd:element name="Font" minOccurs="0" maxOccurs="1">
0381                 <xsd:complexType>
0382                     <xsd:simpleContent>
0383                         <xsd:extension base="xsd:string">
0384                             <xsd:attribute name="Unit"          type="xsd:double"       use="required"/>
0385                             <xsd:attribute name="Bold"          type="xsd:boolean"      use="required"/>
0386                             <xsd:attribute name="Italic"        type="xsd:boolean"      use="required"/>
0387                             <xsd:attribute name="Underline"     type="gmr:underline"    use="required"/>
0388                             <xsd:attribute name="StrikeThrough" type="xsd:boolean"      use="required"/>
0389                         </xsd:extension>
0390                     </xsd:simpleContent>
0391                 </xsd:complexType>
0392             </xsd:element>
0393             <xsd:element name="HyperLink" minOccurs="0" maxOccurs="1">
0394                 <xsd:complexType>
0395                     <xsd:attribute name="type"          type="xsd:string"  use="required"/>
0396                     <xsd:attribute name="target"        type="xsd:string"  use="optional"/>
0397                     <xsd:attribute name="tip"           type="xsd:string"  use="optional"/>
0398                 </xsd:complexType>
0399             </xsd:element>
0400             <xsd:element name="StyleBorder" minOccurs="0" maxOccurs="1">
0401                 <xsd:complexType>
0402                     <xsd:sequence>
0403                         <xsd:element name="Top"          type="gmr:StyleBorderElement"/>
0404                         <xsd:element name="Bottom"       type="gmr:StyleBorderElement"/>
0405                         <xsd:element name="Left"         type="gmr:StyleBorderElement"/>
0406                         <xsd:element name="Right"        type="gmr:StyleBorderElement"/>
0407                         <xsd:element name="Diagonal"     type="gmr:StyleBorderElement"/>
0408                         <xsd:element name="Rev-Diagonal" type="gmr:StyleBorderElement"/>
0409                     </xsd:sequence>
0410                 </xsd:complexType>
0411             </xsd:element>
0412             <xsd:element name="Validation" minOccurs="0" maxOccurs="1">
0413                 <xsd:complexType>
0414                     <xsd:simpleContent>
0415                         <xsd:extension base="xsd:string">
0416                             <xsd:attribute name="Style"         type="xsd:integer"  use="required"/>
0417                             <xsd:attribute name="Type"          type="xsd:integer"  use="required"/>
0418                             <xsd:attribute name="Operator"      type="xsd:integer"  use="optional"/>
0419                             <xsd:attribute name="AllowBlank"    type="xsd:boolean"  use="optional"/>
0420                             <xsd:attribute name="UseDropdown"   type="xsd:boolean"  use="optional"/>
0421                             <xsd:attribute name="Title"         type="xsd:string"   use="optional"/>
0422                             <xsd:attribute name="Message"       type="xsd:string"   use="optional"/>
0423                             <xsd:attribute name="Expression0"   type="xsd:string"   use="optional"/>
0424                             <xsd:attribute name="Expression1"   type="xsd:string"   use="optional"/>
0425                         </xsd:extension>
0426                     </xsd:simpleContent>
0427                 </xsd:complexType>
0428             </xsd:element>
0429         </xsd:sequence>
0430         <xsd:attribute name="HAlign"       type="gmr:horizontal_alignment"/>
0431         <xsd:attribute name="VAlign"       type="gmr:vertical_alignment"  />
0432         <xsd:attribute name="WrapText"     type="xsd:boolean"             />
0433         <xsd:attribute name="ShrinkToFit"  type="xsd:integer"             />    <!-- should be bool, but some files have odd truth values -->
0434         <xsd:attribute name="Rotation"     type="xsd:integer"             use="optional"/>
0435         <xsd:attribute name="Orient"       type="xsd:integer"             use="optional"/>
0436         <xsd:attribute name="Shade"        type="gmr:style_shading"       />
0437         <xsd:attribute name="Indent"       type="xsd:integer"             />
0438         <xsd:attribute name="Locked"       type="xsd:boolean"             />
0439         <xsd:attribute name="Hidden"       type="xsd:boolean"             />
0440         <xsd:attribute name="Fore"         type="gmr:color"               />
0441         <xsd:attribute name="Back"         type="gmr:color"               />
0442         <xsd:attribute name="PatternColor" type="gmr:color"               />
0443         <!-- the most common value of the Format attribute, by far, is
0444              General. Here are some other values: 
0445              #,##0.00
0446              $0.00_);[Red]($0.00)
0447              "$"#,##0.00_);[Red]\("$"#,##0.00\)
0448              [Blue][<1000];[Red][<100];[Yellow][<0];[Green][=0];[Blue][>10];[Red][>100];[Yellow][>1000]
0449              [Blue][>=1000];[Red][>=100];[Yellow][>0];[Green][=0];[Yellow][>-100];[Red][>-1000];[Blue];[Cyan]
0450              [>100]"bigger than 100:" 0.00;[>1000]"bigger than 1000": 0.00
0451              [Blue];[Red];[Yellow];[Green]
0452         -->
0453         <xsd:attribute name="Format"       type="xsd:string"           use="required"/>
0454     </xsd:complexType>
0455     
0456     <xsd:complexType name="StyleBorderElement">
0457         <xsd:attribute name="Style" type="gmr:border_style" use="required"/>
0458         <!-- Color is present when Style is not 0 -->
0459         <xsd:attribute name="Color" type="gmr:color"        use="optional"/>
0460     </xsd:complexType>
0461     
0462     <xsd:simpleType name="border_style">
0463         <xsd:restriction base="xsd:integer">
0464             <!--  0 = NONE
0465                   1 = THIN
0466                   2 = MEDIUM
0467                   3 = DASHED
0468                   4 = DOTTED
0469                   5 = THICK
0470                   6 = DOUBLE
0471                   7 = HAIR
0472                   8 = MEDIUM_DASH
0473                   9 = DASH_DOT
0474                  10 = MEDIUM_DASH_DOT
0475                  11 = DASH_DOT_DOT
0476                  12 = MEDIUM_DASH_DOT_DOT
0477                  13 = SLANTED_DASH_DOT
0478             -->
0479             <xsd:minInclusive value="0"/>
0480             <xsd:maxInclusive value="13"/>
0481         </xsd:restriction>
0482     </xsd:simpleType>
0483 
0484     <xsd:simpleType name="underline">
0485         <xsd:restriction base="xsd:integer">
0486             <!-- 0 = NONE
0487                  1 = SINGLE
0488                  2 = DOUBLE
0489             -->
0490             <xsd:minInclusive value="0"/>
0491             <xsd:maxInclusive value="2"/>
0492         </xsd:restriction>
0493     </xsd:simpleType>
0494 
0495     <xsd:simpleType name="horizontal_alignment">
0496         <xsd:restriction base="xsd:integer">
0497             <!-- this is a bit map as follows:
0498                   1 = GENERAL
0499                   2 = LEFT
0500                   4 = RIGHT
0501                   8 = CENTER
0502                  16 = FILL
0503                  32 = JUSTIFY
0504                  64 = CENTER ACROSS SELECTION
0505             -->
0506             <xsd:minInclusive value="0"/>
0507             <xsd:maxInclusive value="127"/>
0508         </xsd:restriction>
0509     </xsd:simpleType>
0510 
0511     <xsd:simpleType name="vertical_alignment">
0512         <xsd:restriction base="xsd:integer">
0513             <!-- this is a bit map as follows:
0514                  1 = TOP
0515                  2 = BOTTOM
0516                  4 = CENTER
0517                  8 = JUSTIFY
0518             -->
0519             <xsd:minInclusive value="0"/>
0520             <xsd:maxInclusive value="15"/>
0521         </xsd:restriction>
0522     </xsd:simpleType>
0523 
0524     <xsd:simpleType name="style_shading">
0525         <xsd:restriction base="xsd:integer">
0526             <!-- the values are defined as follows:
0527                   0 = NONE
0528                   1 = Solid
0529                   2 = 75%
0530                   3 = 50%
0531                   4 = 25%
0532                   5 = 12.5%
0533                   6 = 6.25%
0534                   7 = Horizontal Stripe
0535                   8 = Vertical Stripe
0536                   9 = Reverse Diagonal Stripe
0537                  10 = Diagonal Stripe
0538                  11 = Diagonal Crosshatch
0539                  12 = Thick Diagonal Crosshatch
0540                  13 = Thin Horizontal Stripe
0541                  14 = Thin Vertical Stripe
0542                  15 = Thin Reverse Diagonal Stripe
0543                  16 = Thin Diagonal Stripe
0544                  17 = Thin Crosshatch
0545                  18 = Thin Diagonal Crosshatch
0546                  19 = Applix small circle
0547                  20 = Applix semicircle
0548                  21 = Applix small thatch
0549                  22 = Applix round thatch
0550                  23 = Applix Brick
0551                  24 = 100%
0552                  25 = 87.5%
0553             -->
0554             <xsd:minInclusive value="0"/>
0555             <xsd:maxInclusive value="25"/>
0556         </xsd:restriction>
0557     </xsd:simpleType>
0558 
0559     <xsd:simpleType name="color">
0560         <xsd:restriction base="xsd:string">
0561             <!-- colors in hex, 16 bits red, green, then blue -->
0562             <xsd:pattern value="[0-9A-F]{1,4}:[0-9A-F]{1,4}:[0-9A-F]{1,4}"/>
0563         </xsd:restriction>
0564     </xsd:simpleType>
0565 
0566     <xsd:complexType name="Col_Row">
0567         <!-- column/row number -->
0568         <xsd:attribute name="No"           type="xsd:nonNegativeInteger" use="required"/>
0569         <!-- size in points -->
0570         <xsd:attribute name="Unit"         type="xsd:double"             use="required"/>
0571         <!-- top/left margin, in points -->
0572         <xsd:attribute name="MarginA"      type="gmr:col_row_margin"     use="required"/>
0573         <!-- bottom/right margin, in points -->
0574         <xsd:attribute name="MarginB"      type="gmr:col_row_margin"     use="required"/>
0575         <!-- true if size is explicitly set -->
0576         <xsd:attribute name="HardSize"     type="xsd:boolean"            use="optional" default="0"/>
0577         <xsd:attribute name="Hidden"       type="xsd:boolean"            use="optional" default="0"/>
0578         <xsd:attribute name="Collapsed"    type="xsd:boolean"            use="optional" default="0"/>
0579         <xsd:attribute name="OutlineLevel" type="xsd:integer"            use="optional" default="0"/>
0580         <!-- The number of consequitive identically sized cols/rows -->
0581         <xsd:attribute name="Count"        type="xsd:integer"            use="optional" default="1"/>
0582     </xsd:complexType>
0583     
0584     <xsd:simpleType name="col_row_margin">
0585         <xsd:restriction base="xsd:integer">
0586             <xsd:minInclusive value="0"/>
0587             <xsd:maxInclusive value="7"/>
0588         </xsd:restriction>
0589     </xsd:simpleType>
0590 
0591     <xsd:complexType name="Selections">
0592         <xsd:sequence>
0593             <xsd:element name="Selection" minOccurs="0" maxOccurs="unbounded">
0594                 <xsd:complexType>
0595                     <xsd:attribute name="startCol" type="xsd:nonNegativeInteger" use="required"/>
0596                     <xsd:attribute name="startRow" type="xsd:nonNegativeInteger" use="required"/>
0597                     <xsd:attribute name="endCol"   type="xsd:nonNegativeInteger" use="required"/>
0598                     <xsd:attribute name="endRow"   type="xsd:nonNegativeInteger" use="required"/>
0599                 </xsd:complexType>
0600             </xsd:element>
0601         </xsd:sequence>
0602         <xsd:attribute name="CursorCol" type="xsd:nonNegativeInteger" use="required"/>
0603         <xsd:attribute name="CursorRow" type="xsd:nonNegativeInteger" use="required"/>
0604     </xsd:complexType>
0605     
0606     <xsd:attributeGroup name="ObjectAnchor">
0607         <xsd:attribute name="ObjectBound"      type="xsd:string"        use="required"/>
0608         <xsd:attribute name="ObjectOffset"     type="gmr:offsets"       use="required"/>
0609         <xsd:attribute name="ObjectAnchorType" type="gmr:anchor_type"   use="required"/>
0610         <xsd:attribute name="Direction"        type="gmr:direction"     use="required"/>
0611     </xsd:attributeGroup>
0612 
0613     <xsd:attributeGroup name="ObjectAdjustmentProps">
0614         <xsd:attribute name="Min"       type="xsd:double"       use="required"/>
0615         <xsd:attribute name="Max"       type="xsd:double"       use="required"/>
0616         <xsd:attribute name="Inc"       type="xsd:double"       use="required"/>
0617         <xsd:attribute name="Page"      type="xsd:double"       use="required"/>
0618         <xsd:attribute name="Value"     type="xsd:double"       use="required"/>
0619         <xsd:attribute name="Input"     type="xsd:string"       use="required"/>
0620     </xsd:attributeGroup>
0621 
0622     <xsd:complexType name="Objects">
0623         <!-- little is known about this, as I have no current sample code that
0624               uses this element, and the code that generates these elements is
0625               pretty convoluted
0626         -->
0627         <xsd:sequence>
0628             <xsd:element name="SheetObjectBonobo" minOccurs="0" maxOccurs="unbounded">
0629                 <xsd:complexType>
0630                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0631                 </xsd:complexType>
0632             </xsd:element>
0633             <xsd:element name="CellComment"       minOccurs="0" maxOccurs="unbounded">
0634                 <xsd:complexType>
0635                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0636                     <xsd:attribute name="Author"           type="xsd:string"  use="required"/>
0637                     <xsd:attribute name="Text"             type="xsd:string"  use="required"/>
0638                 </xsd:complexType>
0639             </xsd:element>
0640             <xsd:element name="SheetObjectFilled" minOccurs="0" maxOccurs="unbounded">
0641                 <xsd:complexType>
0642                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0643                     <xsd:attribute name="OutlineColor"     type="gmr:color"               use="required"/>
0644                     <xsd:attribute name="FillColor"        type="gmr:color"               use="required"/>
0645                     <xsd:attribute name="Type"             type="gmr:objectfilled"        use="required"/>
0646                     <xsd:attribute name="Width"            type="xsd:positiveInteger" use="required"/>
0647                     <!-- the arrow shape attributes are only used if the type is
0648                          arrow (type="gmr:2")
0649                     -->
0650                     <xsd:attribute name="ArrowShapeA"      type="xsd:double"          use="optional"/>
0651                     <xsd:attribute name="ArrowShapeB"      type="xsd:double"          use="optional"/>
0652                     <xsd:attribute name="ArrowShapeC"      type="xsd:double"          use="optional"/>
0653                 </xsd:complexType>
0654             </xsd:element>
0655 
0656 <!-- widgets -->
0657             <xsd:element name="SheetWidgetButton"            minOccurs="0" maxOccurs="unbounded">
0658                 <xsd:complexType>
0659                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0660                     <xsd:attribute name="Label"            type="xsd:string"  use="required"/>
0661                 </xsd:complexType>
0662             </xsd:element>
0663             <xsd:element name="SheetWidgetCheckbox"          minOccurs="0" maxOccurs="unbounded">
0664                 <xsd:complexType>
0665                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0666                     <xsd:attribute name="Label"            type="xsd:string"  use="required"/>
0667                     <xsd:attribute name="Value"            type="xsd:integer" use="required"/>
0668                     <xsd:attribute name="Input"            type="xsd:string"  use="required"/>
0669                 </xsd:complexType>
0670             </xsd:element>
0671             <xsd:element name="SheetWidgetToggleButton"         minOccurs="0" maxOccurs="unbounded">
0672                 <xsd:complexType>
0673                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0674                     <xsd:attribute name="Label"            type="xsd:string"  use="required"/>
0675                     <xsd:attribute name="Value"            type="xsd:integer" use="required"/>
0676                     <xsd:attribute name="Input"            type="xsd:string"  use="required"/>
0677                 </xsd:complexType>
0678             </xsd:element>
0679 
0680             <xsd:element name="SheetWidgetScrollbar"          minOccurs="0" maxOccurs="unbounded">
0681                 <xsd:complexType>
0682                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0683                     <xsd:attributeGroup ref="gmr:ObjectAdjustmentProps"/>
0684                 </xsd:complexType>
0685             </xsd:element>
0686             <xsd:element name="SheetWidgetSpinbutton"          minOccurs="0" maxOccurs="unbounded">
0687                 <xsd:complexType>
0688                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0689                     <xsd:attributeGroup ref="gmr:ObjectAdjustmentProps"/>
0690                 </xsd:complexType>
0691             </xsd:element>
0692             <xsd:element name="SheetWidgetSlider"               minOccurs="0" maxOccurs="unbounded">
0693                 <xsd:complexType>
0694                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0695                     <xsd:attributeGroup ref="gmr:ObjectAdjustmentProps"/>
0696                 </xsd:complexType>
0697             </xsd:element>
0698 
0699             <xsd:element name="SheetObjectImage"          minOccurs="0" maxOccurs="unbounded">
0700                 <xsd:complexType>
0701                     <xsd:sequence>
0702                         <xsd:element name="Content" form="unqualified">
0703                             <xsd:complexType mixed="true">
0704                                 <xsd:attribute name="image-type" type="xsd:string"      use="required"/>
0705                                 <xsd:attribute name="size-bytes" type="xsd:int"         use="optional"/>
0706                             </xsd:complexType>
0707                         </xsd:element>
0708                     </xsd:sequence>
0709                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0710                     <xsd:attribute name="crop-top"      type="xsd:double"  use="required"/>
0711                     <xsd:attribute name="crop-bottom"   type="xsd:double"  use="required"/>
0712                     <xsd:attribute name="crop-left"     type="xsd:double"  use="required"/>
0713                     <xsd:attribute name="crop-right"    type="xsd:double"  use="required"/>
0714                 </xsd:complexType>
0715             </xsd:element>
0716             <xsd:element name="SheetObjectGraph"          minOccurs="0" maxOccurs="unbounded">
0717                 <xsd:complexType>
0718                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0719                 </xsd:complexType>
0720             </xsd:element>
0721             <xsd:element name="SheetWidgetFrame"             minOccurs="0" maxOccurs="unbounded">
0722                 <xsd:complexType>
0723                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0724                 </xsd:complexType>
0725             </xsd:element>
0726             <xsd:element name="SheetWidgetLabel"             minOccurs="0" maxOccurs="unbounded">
0727                 <xsd:complexType>
0728                     <xsd:attributeGroup ref="gmr:ObjectAnchor"/>
0729                 </xsd:complexType>
0730             </xsd:element>
0731         </xsd:sequence>
0732     </xsd:complexType>
0733     
0734     <xsd:simpleType name="offsets">
0735         <xsd:restriction base="xsd:string">
0736             <!-- if this seems hard to read, it purportedly describes 4
0737                  space-separated doubles
0738             -->
0739             <xsd:pattern value="[+\-]?\d+(.\d+)?([Ee]([+\-])?\d+)? [+\-]?\d+(.\d+)?([Ee]([+\-])?\d+)? [+\-]?\d+(.\d+)?([Ee]([+\-])?\d+)? [+\-]?\d+(.\d+)?([Ee]([+\-])?\d+)?"/>
0740         </xsd:restriction>
0741     </xsd:simpleType>
0742 
0743     <xsd:simpleType name="anchor_type">
0744         <xsd:restriction base="xsd:string">
0745             <!-- if this seems hard to read, it purportedly describes 4
0746                  space-separated positive numbers
0747 
0748                  each number needs to be one of the following:
0749                   0 = UNKNOWN
0750                  16 = PERCENTAGE_FROM_COLROW_START
0751                  17 = PERCENTAGE_FROM_COLROW_END
0752                  32 = PTS_FROM_COLROW_START
0753                  33 = PTS_FROM_COLROW_END
0754                  48 = PTS_ABSOLUTE
0755             -->
0756             <xsd:pattern value="\d+ \d+ \d+ \d+"/>
0757         </xsd:restriction>
0758     </xsd:simpleType>
0759 
0760     <xsd:simpleType name="direction">
0761         <xsd:restriction base="xsd:string">
0762             <xsd:enumeration value="-1"/>       <!-- unknown    -->
0763             <xsd:enumeration value="0"/>        <!-- up right   -->
0764             <xsd:enumeration value="1"/>        <!-- up left    -->
0765             <xsd:enumeration value="16"/>       <!-- down right -->
0766             <xsd:enumeration value="17"/>       <!-- down left  -->
0767             <xsd:enumeration value="255"/>      <!-- unknown    -->
0768         </xsd:restriction>
0769     </xsd:simpleType>
0770 
0771     <xsd:simpleType name="objectfilled">
0772         <xsd:restriction base="xsd:string">
0773             <xsd:enumeration value="1"/>   <!-- line  -->
0774             <xsd:enumeration value="2"/>   <!-- arrow -->
0775             <xsd:enumeration value="101"/> <!-- box   -->
0776             <xsd:enumeration value="102"/> <!-- oval  -->
0777         </xsd:restriction>
0778     </xsd:simpleType>
0779 
0780     <xsd:complexType name="Cells">
0781        <xsd:sequence>
0782            <xsd:element name="Cell" minOccurs="0" maxOccurs="unbounded">
0783                <!-- expressions are stored as entered, with a leading '='.
0784                     Once a shared expression has been defined, subsequent
0785                     Cell elements using that same shared expression simply
0786                     use the "ExprID" attribute to indicate which shared
0787                     expression is used, and no Content element is included
0788                -->
0789                <xsd:complexType mixed="true">
0790                    <!-- Compatibility for ancient 0.x format -->
0791                    <xsd:sequence>
0792                        <xsd:element name="Content"           type="xsd:string" minOccurs="0" maxOccurs="1"/>
0793                    </xsd:sequence>
0794 
0795                    <!-- Col and Row are sufficient for a cell that is an element of
0796                         an array of cells as long as it's not the top left cell
0797                    -->
0798                    <xsd:attribute name="Col"         type="xsd:nonNegativeInteger" use="required"/>
0799                    <xsd:attribute name="Row"         type="xsd:nonNegativeInteger" use="required"/>
0800                    <!-- ExprID is only used to refer to a shared expression -->
0801                    <xsd:attribute name="ExprID"      type="xsd:positiveInteger" use="optional"/>
0802                    <!-- ValueType is not used if the cell contains an expression -->
0803                    <xsd:attribute name="ValueType"   type="gmr:cell_type"           use="optional"/>
0804                    <!-- ValueFormat is apparently used only for cell-by-cell format
0805                         overrides
0806                    -->
0807                    <xsd:attribute name="ValueFormat" type="xsd:string"          use="optional"/>
0808                    <!-- Cols and Rows are used to define an array of cells -->
0809                    <xsd:attribute name="Cols"        type="xsd:positiveInteger" use="optional"/>
0810                    <xsd:attribute name="Rows"        type="xsd:positiveInteger" use="optional"/>
0811 
0812                </xsd:complexType>
0813            </xsd:element>
0814        </xsd:sequence>
0815     </xsd:complexType>
0816     
0817     <xsd:simpleType name="cell_type">
0818         <xsd:restriction base="xsd:string">
0819             <xsd:enumeration value="10"/> <!-- empty     -->
0820             <xsd:enumeration value="20"/> <!-- boolean   -->
0821             <xsd:enumeration value="30"/> <!-- integer   -->
0822             <xsd:enumeration value="40"/> <!-- float     -->
0823             <xsd:enumeration value="50"/> <!-- error     -->
0824             <xsd:enumeration value="60"/> <!-- string    -->
0825             <xsd:enumeration value="70"/> <!-- cellrange -->
0826             <xsd:enumeration value="80"/> <!-- array     -->
0827         </xsd:restriction>
0828     </xsd:simpleType>
0829 
0830     <xsd:complexType name="MergedRegions">
0831        <xsd:sequence>
0832            <xsd:element name="Merge" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
0833        </xsd:sequence>
0834     </xsd:complexType>
0835 
0836     <xsd:complexType name="Solver">
0837         <xsd:sequence>
0838             <xsd:element name="Constr" minOccurs="0" maxOccurs="unbounded">
0839                 <xsd:complexType>
0840                     <xsd:attribute name="Lcol" type="xsd:nonNegativeInteger" use="required"/>
0841                     <xsd:attribute name="Lrow" type="xsd:nonNegativeInteger" use="required"/>
0842                     <xsd:attribute name="Rcol" type="xsd:nonNegativeInteger" use="required"/>
0843                     <xsd:attribute name="Rrow" type="xsd:nonNegativeInteger" use="required"/>
0844                     <xsd:attribute name="Cols" type="xsd:positiveInteger"    use="required"/>
0845                     <xsd:attribute name="Rows" type="xsd:positiveInteger"    use="required"/>
0846                     <xsd:attribute name="Type" type="gmr:solver_contraint_t"    use="required"/>
0847                 </xsd:complexType>
0848             </xsd:element>
0849         </xsd:sequence>
0850         <xsd:attribute name="TargetCol"   type="xsd:integer"            use="optional"/>
0851         <xsd:attribute name="TargetRow"   type="xsd:integer"            use="optional"/>
0852         <xsd:attribute name="ProblemType" type="gmr:solver_problem_t"   use="required"/>
0853         <xsd:attribute name="Inputs"      type="xsd:string"             use="required"/>
0854         <xsd:attribute name="MaxTime"     type="xsd:integer"            use="required"/>
0855         <xsd:attribute name="MaxIter"     type="xsd:integer"            use="required"/>
0856         <xsd:attribute name="NonNeg"      type="xsd:boolean"            use="required"/>
0857         <xsd:attribute name="Discr"       type="xsd:boolean"            use="required"/>
0858         <xsd:attribute name="AutoScale"   type="xsd:boolean"            use="required"/>
0859         <xsd:attribute name="ShowIter"    type="xsd:boolean"            use="required"/>
0860         <xsd:attribute name="AnswerR"     type="xsd:boolean"            use="required"/>
0861         <xsd:attribute name="SensitivityR" type="xsd:boolean"           use="required"/>
0862         <xsd:attribute name="LimitsR"     type="xsd:boolean"            use="required"/>
0863         <xsd:attribute name="PerformR"    type="xsd:boolean"            use="required"/>
0864         <xsd:attribute name="ProgramR"    type="xsd:boolean"            use="required"/>
0865     </xsd:complexType>
0866 
0867     <xsd:simpleType name="solver_contraint_t">
0868         <xsd:restriction base="xsd:integer">
0869             <xsd:enumeration value="0" /> <!-- none -->
0870             <xsd:enumeration value="1" /> <!-- &lt;= -->
0871             <xsd:enumeration value="2" /> <!-- &gt;= -->
0872             <xsd:enumeration value="4" /> <!-- = -->
0873             <xsd:enumeration value="8" /> <!-- Int -->
0874             <xsd:enumeration value="16"/> <!-- boolean -->
0875         </xsd:restriction>
0876     </xsd:simpleType>
0877     
0878     <xsd:simpleType name="solver_problem_t">
0879         <xsd:restriction base="xsd:integer">
0880             <xsd:enumeration value="0" /> <!-- SolverMinimize -->
0881             <xsd:enumeration value="1" /> <!-- SolverMaximize -->
0882             <xsd:enumeration value="2" /> <!-- SolverEqualTo -->
0883         </xsd:restriction>
0884     </xsd:simpleType>
0885 
0886     <xsd:complexType name="SheetLayout">
0887       <xsd:sequence>
0888            <xsd:element name="FreezePanes" minOccurs="0" maxOccurs="1">
0889              <xsd:complexType>
0890                 <xsd:attribute name="FrozenTopLeft"   type="xsd:string" use="required"/>
0891                 <xsd:attribute name="UnfrozenTopLeft" type="xsd:string" use="required"/>
0892              </xsd:complexType>
0893            </xsd:element>
0894       </xsd:sequence>
0895       <xsd:attribute name="TopLeft"   type="xsd:string" use="required"/>
0896     </xsd:complexType>
0897 
0898 </xsd:schema>