Definition Type Element
Name character-sheet-definition
Abstract False
Documentation This is the root node from which all definition information descends.

A definition file accomplishes four goals:  it sets up game system rules so that kLoOge.Werks can act on those rules; it defines the data that a character sheet contains so that data can be loaded and saved between sessions; it defines expressions based on the data contained in character sheets so that players and the game master can concentrate on the game setting instead of game mechanics; and it defines the user interface that gives access to a character sheet's data.
XSD Schema Character Sheet Definition.xsd
XSD Schema Diagram
XSD Schema Code
<xs:element name="character-sheet-definition" >
  <xs:annotation>
    <xs:documentation>This is the root node from which all definition information descends.

A definition file accomplishes four goals:  it sets up game system rules so that kLoOge.Werks can act on those rules; it defines the data that a character sheet contains so that data can be loaded and saved between sessions; it defines expressions based on the data contained in character sheets so that players and the game master can concentrate on the game setting instead of game mechanics; and it defines the user interface that gives access to a character sheet's data.
</xs:documentation>
  </xs:annotation>

  <xs:complexType>
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="id" type="xs:string">
        <xs:annotation>
          <xs:documentation>A unique identifier for this definition.</xs:documentation>
        </xs:annotation>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="1" name="desc" type="xs:string">
        <xs:annotation>
          <xs:documentation>A description for this definition.  This will appear throughout the program to identify the definition.</xs:documentation>
        </xs:annotation>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="1" name="style-sheet" type="xs:string">
        <xs:annotation>
          <xs:documentation>An XSL file to transform character sheet data to other formats.</xs:documentation>
        </xs:annotation>

      </xs:element>

      <xs:element minOccurs="1" maxOccurs="1" name="tag" type="xs:string">
        <xs:annotation>
          <xs:documentation>The identifier to use when saving character sheet data to an XML file.</xs:documentation>
        </xs:annotation>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="unbounded" name="alt-tag" type="xs:string">
        <xs:annotation>
          <xs:documentation>An alternate tag for data that can be loaded by this definition without transformation.</xs:documentation>
        </xs:annotation>

      </xs:element>

      <xs:element minOccurs="0" name="base-rules">
        <xs:annotation>
          <xs:documentation>Game system base rule definition.</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" default="false" name="no-special-initiative-handling" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag to indicate that the program should not treat expressions of type &quot;init&quot; in any special way.  By default, expressions of type &quot;init&quot; will be moved from wherever they are encountered and placed in a more strategic location for easy access.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" default="false" name="special-icon-effect-handling" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag to indicate that the program should treat Icon Effects with a duration of &quot;1.0&quot; specially.  Essentially, if this flag is set and an Icon Effect is created during combat, the ID of the current Icon will be stored with the effect.  When that Icon's initiative comes around again, the Effect's remaining time will be adjusted to zero.  This allows you to create effects that last for precisely one round, no matter how many Icons are added to or removed from initiative during the course of a round.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="init-def">
              <xs:annotation>
                <xs:documentation>Definition of rules governing how initiative is handled.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="1" name="round-duration" type="xs:integer">
                    <xs:annotation>
                      <xs:documentation>The duration, in seconds, of a single combat round.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="resolve-init-conflict" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field where the program should look for a hint about resolving identical initiative values.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" default="false" name="init-high-to-low" type="xs:boolean">
                    <xs:annotation>
                      <xs:documentation>Flag to indicate that initiative should progress from highest initiative roll to lowest roll.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="combat-start-sound" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The name of the sound to play when combat is started.  This value is expressed as a relative path name beneath the &quot;data location.&quot;  Therefore, you would specify it as &quot;sounds/combat_start.wav&quot; instead of &quot;/Data/Location/Folder/sounds/combat_start.wav.&quot;</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="init-sound" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The name of the sound to play when initiative changes.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="round-sound" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The name of the sound to play when the round changes.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" default="true" name="init-low-to-high" type="xs:boolean">
                    <xs:annotation>
                      <xs:documentation>Flag indicating that initiative should proceed from lowest initiative roll to highest roll.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="segments">
                    <xs:annotation>
                      <xs:documentation>For game systems that use combat segments instead of initiative values, you can define the segments here.</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" maxOccurs="unbounded" name="segment">
                          <xs:annotation>
                            <xs:documentation>An individual segment in a list of segments.</xs:documentation>
                          </xs:annotation>

                          <xs:complexType>
                            <xs:sequence>
                              <xs:element minOccurs="1" maxOccurs="1" name="name" type="xs:string">
                                <xs:annotation>
                                  <xs:documentation>The name of the segment.</xs:documentation>
                                </xs:annotation>

                              </xs:element>

                              <xs:element minOccurs="1" maxOccurs="1" name="value-range" type="xs:string">
                                <xs:annotation>
                                  <xs:documentation>The range of values that falls within this segment.  This can be a literal value (&quot;1&quot;), a range (&quot;2-6&quot;), a comma-separated list (&quot;7,9,11&quot;) or a combination (&quot;3,6-9,11,13-20&quot;).</xs:documentation>
                                </xs:annotation>

                              </xs:element>

                            </xs:sequence>

                          </xs:complexType>

                        </xs:element>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="dice-sound" type="xs:string">
              <xs:annotation>
                <xs:documentation>The sound to play when dice are rolled.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="heal-sound" type="xs:string">
              <xs:annotation>
                <xs:documentation>The sound to play when hit points are adjusted in a beneficial direction.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="harm-sound" type="xs:string">
              <xs:annotation>
                <xs:documentation>The sound to play when hit points are adjusted in a detrimental direction.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="armed-sound" type="xs:string">
              <xs:annotation>
                <xs:documentation>The sound to play when a weapon is armed.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="disarmed-sound" type="xs:string">
              <xs:annotation>
                <xs:documentation>The sound to play when a weapon is disarmed.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" name="critical-hit" type="xs:integer">
              <xs:annotation>
                <xs:documentation>The default value to indicate to the program that a critical hit has occurred.  Individual expressions can override this default value if they like.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" name="critical-miss" type="xs:integer">
              <xs:annotation>
                <xs:documentation>The default value to indicate to the program that a critical miss has occurred.  Individual expressions can override this default value if they like.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="critical-multiplier" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value to display when a &quot;critical hit&quot; occurs. Individual expressions can override this default value if they like.  Note that this value is for display purposes only -- the program does not inherently use it to perform any calculations.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" default="false" name="reroll-critical" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating whether the program should automatically re-roll an expression when a &quot;critical hit&quot; occurs.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" default="false" name="treat-data-as-modifiers" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating whether the program should treat all numerical data on the character sheet as a modifier.  This means that any positive value (or zero) will have a plus (&quot;+&quot;) placed in front of it before that value is placed in an expression for evaluation.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" default="true" name="higher-than-ac-to-hit" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating to the program that an expression must evaluate greater than or equal to a comparative value to be considered a &quot;hit.&quot;</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" default="false" name="allow-randomize-hp" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that it is acceptable for the program to attempt to randomize the &quot;hit points&quot; of Icons.  Some game systems do not have a concept of &quot;hit points,&quot; so for them the concept of &quot;randomizing hit points&quot; makes no sense.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="player-field" type="xs:string">
              <xs:annotation>
                <xs:documentation>The ID of the field that probably contains the name of the Player of a particular Icon.  The program uses this information, if it is available, to update a character sheet when a Player selects an Icon via browsing.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="class-field" type="xs:string">
              <xs:annotation>
                <xs:documentation>The ID of the field that probably contains an Icon's &quot;class&quot; information.  If available, the program will use this data to display more information about an Icon.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="hd-field" type="xs:string">
              <xs:annotation>
                <xs:documentation>The ID of the field that probably contains hit dice information.  The program will use this information, in conjunction with &quot;allow-randomize-hp&quot; to randomize an Icon's hit points.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="temporary-modifier-table" type="xs:string">
              <xs:annotation>
                <xs:documentation>The ID of the table that contains temporary modifier information.  Temporary modifiers are used throughout the program to alter an Icon's rolls under special circumstances and for limited amounts of time.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="disabled-point">
              <xs:annotation>
                <xs:documentation>Definition of where the program can look to determine if an Icon should be considered &quot;disabled&quot; or not.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field to compare against.  This is required.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="value" type="xs:integer">
                    <xs:annotation>
                      <xs:documentation>The literal value to compare the value of &quot;field&quot; against.  Depending on whether hit points count up or down, if the data contained in &quot;field&quot; is either below or above this value, the Icon will be considered to be &quot;disabled.&quot;

Instead of a literal value, you can use the &quot;compare&quot; clauses instead of a literal for more flexibility.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field to compare against.

Instead of using a literal &quot;value,&quot; you can specify a &quot;compare-field&quot; and &quot;compare-multiplier.&quot;

If you do this, then the value of the &quot;compare-field&quot; will be multiplied by the &quot;compare-multiplier.&quot;  The result of this calculation will be compared to the value of &quot;field.&quot;  If the result of this calculation is below or above (depending on which way hit points count) the value contained in &quot;field,&quot; the Icon will be considered &quot;disabled.&quot;
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-multiplier" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A multiplier to apply to the value of the &quot;compare-field&quot; to retrieve a percentage scale at which point an Icon will be considered &quot;disabled.&quot;</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifiers">
                    <xs:annotation>
                      <xs:documentation>A list of field IDs whose values can modify another field's value.</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field whose contents will directly modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-positive" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will positively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-negative" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will negatively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="bloodied-point">
              <xs:annotation>
                <xs:documentation>Definition of where the program can look to determine if an Icon should be considered &quot;bloodied&quot; or not.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field to compare against.  This is required.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="value" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The literal value to compare the value of &quot;field&quot; against.  Depending on whether hit points count up or down, if the data contained in &quot;field&quot; is either below or above this value, the Icon will be considered to be &quot;dead.&quot;

Instead of a literal value, you can use the &quot;compare&quot; clauses instead of a literal for more flexibility.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field to compare against.

Instead of using a literal &quot;value,&quot; you can specify a &quot;compare-field&quot; and &quot;compare-multiplier.&quot;

If you do this, then the value of the &quot;compare-field&quot; will be multiplied by the &quot;compare-multiplier.&quot;  The result of this calculation will be compared to the value of &quot;field.&quot;  If the result of this calculation is below or above (depending on which way hit points count) the value contained in &quot;field,&quot; the Icon will be considered &quot;dead.&quot;
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-multiplier" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A multiplier to apply to the value of the &quot;compare-field&quot; to retrieve a percentage scale at which point an Icon will be considered &quot;dead.&quot;</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifiers">
                    <xs:annotation>
                      <xs:documentation>A list of field IDs whose values can modify another field's value.</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field whose contents will directly modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-positive" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will positively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-negative" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will negatively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="dead-point">
              <xs:annotation>
                <xs:documentation>Definition of where the program can look to determine if a PC Icon should be considered &quot;dead&quot; or not.  If &quot;npc-dead-point&quot; is not defined, then this will be used for NPCs as well.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field to compare against.  This is required.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="value" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The literal value to compare the value of &quot;field&quot; against.  Depending on whether hit points count up or down, if the data contained in &quot;field&quot; is either below or above this value, the Icon will be considered to be &quot;dead.&quot;

Instead of a literal value, you can use the &quot;compare&quot; clauses instead of a literal for more flexibility.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field to compare against.

Instead of using a literal &quot;value,&quot; you can specify a &quot;compare-field&quot; and &quot;compare-multiplier.&quot;

If you do this, then the value of the &quot;compare-field&quot; will be multiplied by the &quot;compare-multiplier.&quot;  The result of this calculation will be compared to the value of &quot;field.&quot;  If the result of this calculation is below or above (depending on which way hit points count) the value contained in &quot;field,&quot; the Icon will be considered &quot;dead.&quot;
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-multiplier" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A multiplier to apply to the value of the &quot;compare-field&quot; to retrieve a percentage scale at which point an Icon will be considered &quot;dead.&quot;</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifiers">
                    <xs:annotation>
                      <xs:documentation>A list of field IDs whose values can modify another field's value.</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field whose contents will directly modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-positive" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will positively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-negative" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will negatively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="npc-dead-point">
              <xs:annotation>
                <xs:documentation>Definition of where the program can look to determine if an NPC Icon should be considered &quot;dead&quot; or not.  If not defined then the &quot;dead-point&quot; clause will be used for NPCs as well as PCs.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field to compare against.  This is required.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="value" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The literal value to compare the value of &quot;field&quot; against.  Depending on whether hit points count up or down, if the data contained in &quot;field&quot; is either below or above this value, the Icon will be considered to be &quot;dead.&quot;

Instead of a literal value, you can use the &quot;compare&quot; clauses instead of a literal for more flexibility.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field to compare against.

Instead of using a literal &quot;value,&quot; you can specify a &quot;compare-field&quot; and &quot;compare-multiplier.&quot;

If you do this, then the value of the &quot;compare-field&quot; will be multiplied by the &quot;compare-multiplier.&quot;  The result of this calculation will be compared to the value of &quot;field.&quot;  If the result of this calculation is below or above (depending on which way hit points count) the value contained in &quot;field,&quot; the Icon will be considered &quot;dead.&quot;
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="compare-multiplier" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A multiplier to apply to the value of the &quot;compare-field&quot; to retrieve a percentage scale at which point an Icon will be considered &quot;dead.&quot;</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifiers">
                    <xs:annotation>
                      <xs:documentation>A list of field IDs whose values can modify another field's value.</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field whose contents will directly modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-positive" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will positively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-negative" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The ID of a field which contains data whose absolute value will negatively modify the value of the associated field.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="threatened-area">
              <xs:annotation>
                <xs:documentation>Definition of where the program can retrieve information for rendering &quot;threatened areas.&quot;</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field where &quot;threatened area&quot; data is contained.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="default" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A default value to use if the supplied field of the character sheet does not contain any valid data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="reroll-critical-modifier">
              <xs:annotation>
                <xs:documentation>A clause that gives the program information about where to retrieve data to be applied to a &quot;critical hit&quot; re-roll.

Some game systems allow you to specify a special modifier that is only applied to &quot;critical hit re-roll checks.&quot;  For such game systems, you can use this clause to tell the program where to find this modifier information.
</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field containing special &quot;critical hit&quot; re-roll modifier data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="icon-size">
              <xs:annotation>
                <xs:documentation>This clause supplies the program with information about where to find an Icon's size (as expressed in Map scale units).</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field that should contain Icon size data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="default" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A default value to use if the supplied field does not contain valid size data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="icon-altitude">
              <xs:annotation>
                <xs:documentation>This clause supplies the program with information about where to find an Icon's altitude (as expressed in Map scale units).</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field containing &quot;altitude&quot; data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="chat-filter">
              <xs:annotation>
                <xs:documentation>This clause supplies the program with information about where to find an Icon's chat filter.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field containing &quot;chat filter&quot; data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="light-radius">
              <xs:annotation>
                <xs:documentation>This clause supplies the program with information about where to find an Icon's &quot;light radius.&quot;

The &quot;light radius&quot; is used when &quot;player obscurity&quot; is used so areas of the Map are revealed as Icons move.
</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field containing &quot;light radius&quot; data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="default" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A default value to use if the supplied field does not contain valid light radius data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="attacks-per-round">
              <xs:annotation>
                <xs:documentation>This clause supplies the program with information about where to find an Icon's &quot;attacks per round.&quot;

Some game systems have a fixed idea of how many attacks an Icon can make in a given combat sequence.  Use this clause for such systems so that Icons appear the correct number of times in the combat tracker.
</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field containing &quot;attacks per round&quot; data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="default" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A default value to use if the supplied field does not contain valid attacks per round data.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="sound-file-field" type="xs:string">
              <xs:annotation>
                <xs:documentation>The ID of the field should should contain the name of a sound file to associate with the Icon.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="cur-xp-field" type="xs:string">
              <xs:annotation>
                <xs:documentation>The ID of a field that should contain information about the Icon's current experience point level.

The data contained in this field will be used to display experience point information in the program.  Of course, if your game system does not have a concept of &quot;experience points,&quot; you can use this field to display arbitrary field data that may be of interest to you.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="next-xp-field" type="xs:string">
              <xs:annotation>
                <xs:documentation>The ID of a field that should contain information about the Icon's next experience point level.

The data contained in this field will be used to display experience point information in the program.  Of course, if your game system does not have a concept of &quot;experience points,&quot; you can use this field to display arbitrary field data that may be of interest to you.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="effects-file" type="xs:string">
              <xs:annotation>
                <xs:documentation>The name of a file that is expected to contain Icon Effect information.  These Effects will be made available to the Master in the list of &quot;global&quot; Effects and to Players when they modify an Icon's effects.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="desc-file" type="xs:string">
              <xs:annotation>
                <xs:documentation>The name of a file that contains description information.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="quick-stat-size-x" type="xs:integer">
              <xs:annotation>
                <xs:documentation>The maximum width of the Icon Quick Stat window.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="quick-stat-size-y" type="xs:integer">
              <xs:annotation>
                <xs:documentation>The maximum height of the Icon Quick Stat window.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="unbounded" name="array">
              <xs:annotation>
                <xs:documentation>This clause allows you to define a fixed array of string values that can be references in other places on the character sheets just as any other field can be referenced.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="id" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of this array, which can be used to reference this array just as any other field.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="element" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>An element of the array.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="false" name="local-data-files" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that data files referenced in the definition file should not be sent to Players.

DO NOT SET THIS FLAG UNLESS YOU KNOW WHAT YOU ARE DOING!!!

If set, it is assumed that Players already possess any and all data files referenced in the definition.  As a result, these data files will not be sent to Players.

So long as Players are kept in sync with the Master's data files, this can significantly cut down on data traffic at Player start up (assuming that large data files are in use).

If you find yourself changing your data files on a regular basis, or you do not use large data files, then you are better off not specifying this setting, as it can easily lead to unexpected and difficult to diagnose problems.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="false" name="use-si-units" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that this game system forces the use of SI units.

If not specified, then the Master has the choice of which measuring system to use in Preferences.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="false" name="use-english-units" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that this game system forces the use of English units.

If not specified, then the Master has the choice of which measuring system to use in Preferences.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" name="always-round-down" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that all calculation remainders will be rounded down to the next lowest integer unless directed otherwise by a more specific flag.

For example, a result of &quot;4.5&quot; will be returned as &quot;4.0.&quot;
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="false" name="lower-than-ac-to-hit" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that a roll must be lower or equal to the value contained in the indicated &quot;armor&quot; field to be considered a &quot;hit.&quot;</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="true" name="hps-count-down" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that a higher value of &quot;hit points&quot; is considered &quot;healthy&quot; and a lower value is considered &quot;harmful.&quot;</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="false" name="hps-count-up" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that a lower value of &quot;hit points&quot; is considered &quot;healthy&quot; and a higher value is considered &quot;harmful.&quot;</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" name="max-combined-rolls" type="xs:integer">
              <xs:annotation>
                <xs:documentation>A value that instructs the program the maximum number of rolls that can be combined.

This setting is for game systems that allow you to &quot;gang&quot; rolls together.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="false" name="only-modifiers-when-combined" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that when using &quot;combined&quot; rolls, ignore the die portion of all but the first expression and combine only the modifiers from subsequent expressions into the first expression.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" default="false" name="heal-from-zero" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that &quot;healing&quot; an Icon should ignore negative values.

For example, in a system where hit points count down, if an Icon is at &quot;-5&quot; hit points and receives healing of &quot;6&quot; hit points, instead of being at &quot;1&quot; hit point, he will be at &quot;6.&quot;

For game systems where hit points count up, this logic is reversed.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="mod-pool">
              <xs:annotation>
                <xs:documentation>For game systems that use the concept of a &quot;pool&quot; of modifers that can be drawn from for rolls, this clause allows you to define where the program can expect to retrieve this information.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" maxOccurs="unbounded" name="pool-field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field where the &quot;pool&quot; of modifiers is defined.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="1" maxOccurs="unbounded" name="pool-die-to-use" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the previously defined die to use as the basis for a &quot;mod-pool&quot; roll.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="success-above" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value above which a roll is considered to be a &quot;success.&quot;  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="success-below" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value below which a roll is considered to be a &quot;success.&quot;  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="reroll-above" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value above which a roll is &quot;tossed out&quot; and re-rolled.  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="reroll-above-save" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value above which a roll is &quot;tossed out&quot; and re-rolled, but the fact that the roll was &quot;tossed&quot; is kept track of.  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="reroll-below" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value below which a roll is &quot;tossed out&quot; and re-rolled.  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="reroll-below-save" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value below which a roll is &quot;tossed out&quot; and re-rolled, but the fact that the roll was &quot;tossed&quot; is kept track of.  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="exclude-above" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value above which a roll is excluded from the overall expression result.  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="exclude-below" type="xs:string">
              <xs:annotation>
                <xs:documentation>The default value below which a roll is excluded from the overall expression result.  This can be overridden on a per-expression basis.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" name="always-round-up" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that all calculation remainders will be rounded up to the next highest integer unless directed otherwise by a more specific flag.

For example, a result of &quot;4.5&quot; will be returned as &quot;5.0.&quot;
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="1" name="adjust-hp-script" type="xs:string">
              <xs:annotation>
                <xs:documentation>The name of a script that will be executed before any Icon Effect that makes adjustments to hit points.

This script is allowed to alter the amount of the hit point adjustment, thereby customizing what the program will end up doing.

An example of this type of script is used in the &quot;4e&quot; definition.
</xs:documentation>
              </xs:annotation>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" name="calendar">
        <xs:annotation>
          <xs:documentation>Declaration for a custom calendar.</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="minutes-per-hour" type="xs:integer">
              <xs:annotation>
                <xs:documentation>The number of minutes that make up an hour.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="hours-per-day" type="xs:integer">
              <xs:annotation>
                <xs:documentation>The number of hours in a single day.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="days">
              <xs:annotation>
                <xs:documentation>The days that make up a week.  How many &quot;day&quot; elements occur in this clause implies the number of days in a week.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="day" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The name of a day of the week.  The more &quot;day&quot; elements that exist, the more days there are in a week.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="months">
              <xs:annotation>
                <xs:documentation>Definition for the months of a year.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="month">
                    <xs:annotation>
                      <xs:documentation>A month element.  The number of these elements that occurs implies the number of months in a year.</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" name="name" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The name of the month.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" name="num-days" type="xs:integer">
                          <xs:annotation>
                            <xs:documentation>The number of days in this month.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="weather-conditions">
              <xs:annotation>
                <xs:documentation>Clause to define arbitrary weather conditions.  Once defined, these conditions can be selected to display in the program's calendar.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="weather-condition">
                    <xs:annotation>
                      <xs:documentation>A weather condition element.</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:element minOccurs="0" name="name" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>The name of this weather condition, which is displayed in the program's calendar when this condition is selected.</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                        <xs:element minOccurs="0" name="image" type="xs:string">
                          <xs:annotation>
                            <xs:documentation>An image to go along with the weather condition.  This is rendered over the calendar's gradient, but beneath the calendar's text.

The location of this image is relative to the data location that the program is using.

Note that this is an experimental feature and may not work correctly.
</xs:documentation>
                          </xs:annotation>

                        </xs:element>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" name="tool-tips">
        <xs:annotation>
          <xs:documentation>Tooltips that the program uses to display information about Icons.</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="full-detail">
              <xs:annotation>
                <xs:documentation>The &quot;full-detail&quot; clause controls what the Master will always see in a tooltip and what Players see when the Icon meets the proper conditions for access to its information.

By judicious application of the supported clauses you have very fine control over what Players can and can not see.
</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="block">
                    <xs:annotation>
                      <xs:documentation>An organizational aid.  By locating sub-sections within blocks, you give the program a hint that improves the appearance of a tooltip.

For example, if none of the fields contained in a block contain data, then the block is simply not rendered.
</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:choice maxOccurs="unbounded">
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="format" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Formatting to apply to the data being displayed.  This can be just about any valid HTML formatting string, without the enclosing tag indicators (less-than and greather-than symbols).

For example, valid entries are &quot;b,&quot; &quot;i,&quot; &quot;u,&quot; &quot;em,&quot; ect.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="text-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A label to display if the related Icon allows its condition to be visible.

This is always the case for the Master, but may vary depending on the Icon's settings for Players.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="format-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Formatting, as described in the &quot;format&quot; tag that is only applied if the Icon's condition is available.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="field-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The ID of a field to draw information from, so long as the Icon's condition is available.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="formula-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A parsable expression that will be evaluated if the Icon's condition is availble.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="text" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A label that will always be displayed.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="field" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The ID of a field whose data will always be displayed.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="formula" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A parsable expression that will always be evaluated.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                        </xs:choice>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field whose data will always be displayed.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="format" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>Formatting to apply to the data being displayed.  This can be just about any valid HTML formatting string, without the enclosing tag indicators (less-than and greather-than symbols).

For example, valid entries are &quot;b,&quot; &quot;i,&quot; &quot;u,&quot; &quot;em,&quot; ect.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="text" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A label that will always be displayed.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="formula" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A parsable expression that will always be evaluated.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="field-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field to draw information from, so long as the Icon's condition is available.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="format-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>Formatting, as described in the &quot;format&quot; tag that is only applied if the Icon's condition is available.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="text-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A label to display if the related Icon allows its condition to be visible.

This is always the case for the Master, but may vary depending on the Icon's settings for Players.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="formula-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A parsable expression that will be evaluated if the Icon's condition is availble.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="partial-detail">
              <xs:annotation>
                <xs:documentation>The &quot;partial-detail&quot; clause controls what the Players will always see in a tooltip for an Icon.

This is a brute-force approach to controlling what Players can see.  The preferred method is judicious use of clauses in the &quot;full-detail&quot; clause.
</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" maxOccurs="unbounded" name="block">
                    <xs:annotation>
                      <xs:documentation>An organizational aid.  By locating sub-sections within blocks, you give the program a hint that improves the appearance of a tooltip.

For example, if none of the fields contained in a block contain data, then the block is simply not rendered.
</xs:documentation>
                    </xs:annotation>

                    <xs:complexType>
                      <xs:sequence>
                        <xs:choice maxOccurs="unbounded">
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="format" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Formatting to apply to the data being displayed.  This can be just about any valid HTML formatting string, without the enclosing tag indicators (less-than and greather-than symbols).

For example, valid entries are &quot;b,&quot; &quot;i,&quot; &quot;u,&quot; &quot;em,&quot; ect.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="text-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A label to display if the related Icon allows its condition to be visible.

This is always the case for the Master, but may vary depending on the Icon's settings for Players.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="format-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>Formatting, as described in the &quot;format&quot; tag that is only applied if the Icon's condition is available.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="field-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The ID of a field to draw information from, so long as the Icon's condition is available.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="formula-if-show-cond" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A parsable expression that will be evaluated if the Icon's condition is availble.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="text" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A label that will always be displayed.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="field" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The ID of a field whose data will always be displayed.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="formula" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A parsable expression that will always be evaluated.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                        </xs:choice>

                      </xs:sequence>

                    </xs:complexType>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field whose data will always be displayed.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="format" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>Formatting to apply to the data being displayed.  This can be just about any valid HTML formatting string, without the enclosing tag indicators (less-than and greather-than symbols).

For example, valid entries are &quot;b,&quot; &quot;i,&quot; &quot;u,&quot; &quot;em,&quot; ect.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="text" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A label that will always be displayed.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="formula" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A parsable expression that will always be evaluated.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="field-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of a field to draw information from, so long as the Icon's condition is available.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="format-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>Formatting, as described in the &quot;format&quot; tag that is only applied if the Icon's condition is available.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="text-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A label to display if the related Icon allows its condition to be visible.

This is always the case for the Master, but may vary depending on the Icon's settings for Players.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="unbounded" name="formula-if-show-cond" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A parsable expression that will be evaluated if the Icon's condition is availble.

As a &quot;parsable expression,&quot; this should be surrounded by curly braces and can refer to dice, tokens and perform any math that the program supports.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" name="dice">
        <xs:annotation>
          <xs:documentation>This clause allows you to identify dice sequences that can be accessed in expressions.

Essentially, this is short-hand so you can avoid repetatively entering dice sequences in expressions.  Also, should you decide to change the meaning of a die defined here, you would only need to change it in one place (instead of having to locate every reference to the sequence throughout the deifnition file).
</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="die">
              <xs:annotation>
                <xs:documentation>A die that can be referenced elsewhere.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" maxOccurs="1" name="id" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of this die, which can be referenced elsewhere.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="1" maxOccurs="1" name="sides">
                    <xs:annotation>
                      <xs:documentation>The number of sides that this die has.</xs:documentation>
                    </xs:annotation>

                    <xs:simpleType>
                      <xs:restriction base="xs:integer">
                        <xs:minExclusive value="1"/>
                      </xs:restriction>

                    </xs:simpleType>

                  </xs:element>

                  <xs:element minOccurs="0" name="how-many" type="xs:integer">
                    <xs:annotation>
                      <xs:documentation>How many of this die each reference will &quot;throw.&quot;

For example, you could set up a die called &quot;3d6&quot; and set the number of sides to six and &quot;how-many&quot; to three.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="parse-script" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The name of a script file to be executed whenever this die is  evaluated.

If this script returns a value, that value will be used in the enclosing expression instead of what the die's sides and &quot;how-many&quot; indicates.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="post-script" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The name of a script file to execute after this die is evaluated.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" maxOccurs="1" name="add-to-roll" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>Specifies something that should be added to this die.

For example, you might want to define a die that always adds &quot;$L/2&quot; to its expression.  You can use &quot;add-to-roll&quot; to do this.  When expanded, the net result might look something like &quot;d20$L/2&quot; wherever the die is referenced.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="unbounded" name="conditions">
        <xs:annotation>
          <xs:documentation>Guidelines for instructing the program as to an Icon's relative health.</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="apply-to">
              <xs:annotation>
                <xs:documentation>Clause that tells the program where to look on the character sheet when evaluating what the Icon's current condition is.

Subsequent &quot;condition&quot; clauses will be related to this &quot;apply-to&quot; clause.  Therefore, by defining multiple, alternating sections of &quot;apply-to&quot; and &quot;conditions,&quot; you can effectively create lists of conditions.

This is especially useful for game systems that have multiple hit point sources.
</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="1" maxOccurs="1" name="current-field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field that holds the Icon's current state as a numerical value.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="maximum-field" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the field that contains the Icon's &quot;best health&quot; as a numerical value.

You must specify this tag or &quot;maximum-value,&quot; but not both.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="maximum-value">
                    <xs:annotation>
                      <xs:documentation>Instead of using a field to apply relative heath conditions, you can opt to use a hard-coded value.

This value will apply to all Icons in the campaign, regardless of what their &quot;most healthy&quot; stat might be.

You must specify this tag or &quot;maximum-field,&quot; but not both.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" maxOccurs="unbounded" name="condition">
              <xs:annotation>
                <xs:documentation>Based on the &quot;apply-to&quot; clause that preceeds it, evaluate whether this condition applies to the Icon.

The order in which these clauses appear determines which block will be used, since the program uses a &quot;first match&quot; algorithm.
</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="current-less-or-equal" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A percentile value that indicates that if the data in the &quot;current-field&quot; of the &quot;apply-to&quot; clause is less than or equal to this percentile, then this is the condition to be used.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="current-greater-or-equal" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A percentile value that indicates that if the data in the &quot;current-field&quot; of the &quot;apply-to&quot; clause meets this percentile, then this is the condition to be used.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="current-equals" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A literal value that indicates that if the data in the &quot;current-field&quot; of the &quot;apply-to&quot; clause exactly equals this value, then this is the condition to be used.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="greater-value" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A literal value that indicates that if the data in the &quot;current-field&quot; of the &quot;apply-to&quot; clause is greater than this literal value, then this is the condition to be used.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="greater-or-equal-value" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A literal value that indicates that if the data in the &quot;current-field&quot; of the &quot;apply-to&quot; clause is greater than or equal to this literal value, then this is the condition to be used.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="label" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The label to display if this condition is met.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="less-or-equal-value" type="xs:double">
                    <xs:annotation>
                      <xs:documentation>A literal value that indicates that if the data in the &quot;current-field&quot; of the &quot;apply-to&quot; clause is less than or equal to this value, then this is the condition to be used.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="unbounded" name="expression-tabs">
        <xs:annotation>
          <xs:documentation>Definition of tabs for use in a Dice Dialog.</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="expression-tab">
              <xs:annotation>
                <xs:documentation>An individual tab in the Dice Dialog.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:choice maxOccurs="unbounded">
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="source-id" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The ID of a table or field that is the source of expressions for this tab.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" name="name" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The name of this tab, which is displayed in the Dice Dialog, unless an icon is defined.

If the &quot;use-name-in-tab&quot; flag is set, then this name will also be displayed in addition to an icon.
</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" name="icon" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>A icon to display in this tab.  This can either be one of the default icons bundled with the program, or a relative path to an image file, based off of where the program is installed.

If using a relative path, then Player will need to have this image file in the exact same location as the Master in order for the program to find and load it.
</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" name="tooltip" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>A tooltip to display when the user hovers his mouse pointer over the tab.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="button">
                      <xs:annotation>
                        <xs:documentation>A button placed at the top of this tab.

A button is, essentially, an expression that is evaluated when the button is pressed.

Note that the various tags and labels associated with a button are meant to contain not simple literal values, but also tokens or IDs of other fields.  In this fashion you can define expressions that reference data contained in other places on the character sheet.
</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:choice maxOccurs="unbounded">
                            <xs:element minOccurs="0" name="button-label" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The label to render on the face of this button.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="button-sub-label" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>An additional label to render on the face of this button when it is placed in a Dice Panel.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="type" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The type of expression/button.  Only one of a perdefined list of types are supported.

These types are:

  button - an expression with no special handling
  toggle  - an expression that is added to some other expression
  init        - an initiative experssion
  attrib    - an attribute expression
  save     - a save expression
  attack   - an attack expression
  damage - a damage expression
  spell       - a spell expression
  skill         - a skill expression
  clc          - a &quot;caster level check&quot; expression
  custom   - a custom expression

Not all the expression types indicate that special handling is done, but by specifying the correct type, you indicate to the program that certain handling is expected and, should this handling be expanded in the future, you will be able to take advantage of it without further alteration.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="raw-label" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The &quot;raw&quot; or &quot;base&quot; identification of this expression.  When multiple Icons are selected and a roll performed, the program will evaluate whether all the Icons have matching expressions based on this label.

As such, it should not contain any information specify to a particular Icon.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="exclude-value" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that any value associated with this field/button should be excluded from the expression.

This is especially useful for items that do not actually have any particular value (like buttons) or fields that contain something that will not actually be used in the expression.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="ignore-targets" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that when this expression is evaluated, any targets that the issuing Icon has should be ignored.

This is useful for &quot;skill&quot; and similar expression types that are not evaluated &quot;against&quot; a target, but might be rolled while the Icon is targeting someone.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="low-to-succeed" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a low result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="true" name="high-to-succeed" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a high result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="discard-remainder" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be discarded.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="remainder-round-down" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result down to the next lowest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="remainder-roiund-up" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result up to the next highest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="hit-sound" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="miss-sound" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="critical-hit-sound" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="critical-miss-sound" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="damage-sound" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;damage.&quot;
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="spell-sound" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;spell.&quot;
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="applied-effect" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a pre-defined Icon Effect to apply to the targeted Icon when this expression is evaluated.

Pre-defined Icon Effects are set up by the Master and maintained by him.  In order to be applied, the value of this tag must match exactly the description of a pre-defined Icon Effect.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="hand" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>Reference to where &quot;hand&quot; information about the expression can be retrieved.

This information is used by the program when rendering various aspects of an expression to pass information on to the user.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="1" name="armed" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The ID of a field that indicates whether this item is considered to be &quot;armed&quot; (ie, ready for use).

A state of &quot;armed&quot; does not really impact the behavior of the program, unless the Master has set the Preferences option that forces an expression to be &quot;armed&quot; before it will be evaluated.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="desc-label" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A descriptive labe for this expression.  This is only used for &quot;old style&quot; expression menus.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="target-value" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The &quot;target&quot; that the expression should be evaluated against.

For game systems that support this notion, this value contributes to the program determining whether the result of the expression evaluates to success or failure.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="pre-roll" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A piece of the expression to be inserted before the main portion of the expression is built.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="post-roll" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A piece of the expression to be inserted after the main portion of the expression is built.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="pre-expr" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A piece of the expression that is inserted immediately prior to the main expression.

Where &quot;pre-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="post-expr" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A piece of the expression that is inserted immediately after the main expression.

Where &quot;post-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="die-to-use" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The ID of a previously defined die to be used as the main payload of this expression.

For &quot;custom,&quot; &quot;spell&quot; and &quot;button&quot; expression types, it is assumed that no predefined die will be used, so this tag is generally ignored.  For other expression types, however, this makes up the bulk of the expression's payload.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="static-label" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A label that is used in the &quot;old style&quot; of Dice Dialogs and menus.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="critical-check" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value to be used to determine a &quot;critical hit.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="critical-miss-check" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value to be used to determine a &quot;critical miss.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="sound" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A sound file to play when this expression is evaluated.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="effect" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A visual effect to render when this expression is evaluated.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="exclude-above" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="exclude-below" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="reroll-above" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be re-rolled.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="reroll-above-save" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded, but the number of discardings is retained.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="reroll-below-save" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded, but the number of discardings is retained.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="success-above" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value which, if the expression evaluates in excess of, will indicate success.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="success-below" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A value which, if the expression evaluates lower than, will indicate success.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="no-damage" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The ID of a field that indicates to the program that this expression should never be considered to adjust hit points.

This is useful for expressions of the &quot;spell&quot; variety that may or may not adjust hit points.  By indicating to the program where it can look for a hint, it is better able to determine whether or not to adjust hit points.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="quantity" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The ID of a field where the program can look for quantity information.

The notion of &quot;quantity&quot; applies to an expression that, with a single evaluation, may disberse its results amongst various targets.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="check-availability">
                              <xs:annotation>
                                <xs:documentation>This clause instructs the program where to look to determine if the expression is available for evaluation.

If not present, then an expression is always considered to be available.
</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="0" name="memorized" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="cost" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; may be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="check-against" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field, in the same row as the &quot;compare-to&quot; field, whose value will be used to compare against.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag that indicates whether availability fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="modify-on-roll">
                              <xs:annotation>
                                <xs:documentation>This clause instructs the program where to look to determine what fields should have their contents modified when this expression is evaluated.</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="0" name="memorized" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="cost" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; will be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="modify-field" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of the field to be modified.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag that indicates whether modification fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="1" name="actionable-def">
                              <xs:annotation>
                                <xs:documentation>This clause allows you to give the program a hint regarding which piece of multi-part expression should be used for hit point adjustment.

Primarily intended for expressions of the &quot;spell&quot; type, this clause is prone to failure.  The problem arises from the fact that a &quot;spell&quot; type can contain any number of expression pieces, any one of which (or none of which) may actually cause a hit point adjustment.

The &quot;no-damage&quot; tag is a refinement of this situation, but can not act alone.
</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="1" maxOccurs="1" name="total-clauses" type="xs:integer">
                                    <xs:annotation>
                                      <xs:documentation>The total number of pieces that this expression is expected to contain.

If the expression does not actually contain this many pieces, then no hit point adjustment will be done.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="1" maxOccurs="1" name="use-clause" type="xs:integer">
                                    <xs:annotation>
                                      <xs:documentation>The piece of the expression that should be used for hit point adjustment.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                            <xs:element minOccurs="0" name="color" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The color to use when issuing the the chat message when this expression is evaluated.

This represents a &quot;default,&quot; which can be overridding by various other settings in the program.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="minimum" type="xs:integer">
                              <xs:annotation>
                                <xs:documentation>A minimum possible value for this expression.  If the expression is evaluated and the results is below this minimum, then the minimum value is used instead of the actual results.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="parse-script" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a script to be executed when this expression is evaluated.

If this script returns a result, that result will be used instead of anything that the expression would otherwise generate.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="post-script" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a script to execute after this expression has been evaluated.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="parse-script-ex">
                              <xs:annotation>
                                <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                    <xs:annotation>
                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                          <xs:annotation>
                                            <xs:documentation>An individual script variable.</xs:documentation>
                                          </xs:annotation>

                                          <xs:complexType>
                                            <xs:sequence>
                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                <xs:annotation>
                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                </xs:annotation>

                                              </xs:element>

                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                <xs:annotation>
                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                </xs:annotation>

                                              </xs:element>

                                            </xs:sequence>

                                          </xs:complexType>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="post-script-ex">
                              <xs:annotation>
                                <xs:documentation>A clause that defines a script to be executed after the expression is evaluated.

This differs from the &quot;post-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                    <xs:annotation>
                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                          <xs:annotation>
                                            <xs:documentation>An individual script variable.</xs:documentation>
                                          </xs:annotation>

                                          <xs:complexType>
                                            <xs:sequence>
                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                <xs:annotation>
                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                </xs:annotation>

                                              </xs:element>

                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                <xs:annotation>
                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                </xs:annotation>

                                              </xs:element>

                                            </xs:sequence>

                                          </xs:complexType>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                            <xs:element minOccurs="0" name="rep-expr" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A replacement expression that will replace the base expression with its value.

This is a special-purpose tag whose intention is to allow you to replace the die portion of an expression with something else.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="tooltip" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A tooltip to apply to this button.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="max-roll" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that any dice that occur in the expression should be maximized.  That is, if, for example, an expression contains &quot;{3d6+3},&quot; then the result will always be &quot;21&quot; since the &quot;3d6&quot; will always evaluate to &quot;18.&quot;

This flag is only honored on buttons of type &quot;toggle&quot; (since, otherwise, the expression would never be randomized) and, as a result, is intended to be used to modify another expression.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="static-label-script-ex">
                              <xs:annotation>
                                <xs:documentation>A clause that defines a script to be executed to build an expression's label.

Unlike &quot;parse&quot; scripts, the script referenced by this tag must contain a &quot;getLabel()&quot; method that returns a String.  This string will be used, unaltered, in the program's interface to represent the expression.
</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                    <xs:annotation>
                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                          <xs:annotation>
                                            <xs:documentation>An individual script variable.</xs:documentation>
                                          </xs:annotation>

                                          <xs:complexType>
                                            <xs:sequence>
                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                <xs:annotation>
                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                </xs:annotation>

                                              </xs:element>

                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                <xs:annotation>
                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                </xs:annotation>

                                              </xs:element>

                                            </xs:sequence>

                                          </xs:complexType>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                          </xs:choice>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="combo">
                      <xs:annotation>
                        <xs:documentation>A special interface element that is represented as a drop-down list.  This list contains button elements that are executed when the item in the list is selected by the user.

This is basically a way of getting a large number of buttons into a Dice Dialog without taking up a lot of space on the screen.
</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" name="label" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The label to be rendered next to this control.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="first-label" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The &quot;first label&quot; to be placed in the control.

This is a place-holder that is always displayed when the control is sitting idle.  Selecting it does not execute a roll and when any other item in the list is selected, this item is returned to the selected state afterwards.
</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="button">
                            <xs:annotation>
                              <xs:documentation>A button placed at the top of this tab.

A button is, essentially, an expression that is evaluated when the button is pressed.

Note that the various tags and labels associated with a button are meant to contain not simple literal values, but also tokens or IDs of other fields.  In this fashion you can define expressions that reference data contained in other places on the character sheet.
</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:choice maxOccurs="unbounded">
                                  <xs:element minOccurs="0" name="button-label" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The label to render on the face of this button.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="type" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The type of expression/button.  Only one of a perdefined list of types are supported.

These types are:

  button - an expression with no special handling
  toggle  - an expression that is added to some other expression
  init        - an initiative experssion
  attrib    - an attribute expression
  save     - a save expression
  attack   - an attack expression
  damage - a damage expression
  spell       - a spell expression
  skill         - a skill expression
  clc          - a &quot;caster level check&quot; expression
  custom   - a custom expression

Not all the expression types indicate that special handling is done, but by specifying the correct type, you indicate to the program that certain handling is expected and, should this handling be expanded in the future, you will be able to take advantage of it without further alteration.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="raw-label" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The &quot;raw&quot; or &quot;base&quot; identification of this expression.  When multiple Icons are selected and a roll performed, the program will evaluate whether all the Icons have matching expressions based on this label.

As such, it should not contain any information specify to a particular Icon.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="exclude-value" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag indicating that any value associated with this field/button should be excluded from the expression.

This is especially useful for items that do not actually have any particular value (like buttons) or fields that contain something that will not actually be used in the expression.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="ignore-targets" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag indicating that when this expression is evaluated, any targets that the issuing Icon has should be ignored.

This is useful for &quot;skill&quot; and similar expression types that are not evaluated &quot;against&quot; a target, but might be rolled while the Icon is targeting someone.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="low-to-succeed" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a low result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="true" name="high-to-succeed" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a high result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="discard-remainder" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be discarded.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="remainder-round-down" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result down to the next lowest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" default="false" name="remainder-roiund-up" type="xs:boolean">
                                    <xs:annotation>
                                      <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result up to the next highest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="hit-sound" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="miss-sound" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="critical-hit-sound" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="critical-miss-sound" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="damage-sound" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;damage.&quot;
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="spell-sound" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;spell.&quot;
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="applied-effect" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a pre-defined Icon Effect to apply to the targeted Icon when this expression is evaluated.

Pre-defined Icon Effects are set up by the Master and maintained by him.  In order to be applied, the value of this tag must match exactly the description of a pre-defined Icon Effect.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="hand" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>Reference to where &quot;hand&quot; information about the expression can be retrieved.

This information is used by the program when rendering various aspects of an expression to pass information on to the user.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="1" name="armed" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field that indicates whether this item is considered to be &quot;armed&quot; (ie, ready for use).

A state of &quot;armed&quot; does not really impact the behavior of the program, unless the Master has set the Preferences option that forces an expression to be &quot;armed&quot; before it will be evaluated.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="desc-label" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A descriptive labe for this expression.  This is only used for &quot;old style&quot; expression menus.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="target-value" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The &quot;target&quot; that the expression should be evaluated against.

For game systems that support this notion, this value contributes to the program determining whether the result of the expression evaluates to success or failure.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="pre-roll" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A piece of the expression to be inserted before the main portion of the expression is built.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="post-roll" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A piece of the expression to be inserted after the main portion of the expression is built.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="pre-expr" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A piece of the expression that is inserted immediately prior to the main expression.

Where &quot;pre-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="post-expr" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A piece of the expression that is inserted immediately after the main expression.

Where &quot;post-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="die-to-use" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a previously defined die to be used as the main payload of this expression.

For &quot;custom,&quot; &quot;spell&quot; and &quot;button&quot; expression types, it is assumed that no predefined die will be used, so this tag is generally ignored.  For other expression types, however, this makes up the bulk of the expression's payload.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="static-label" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A label that is used in the &quot;old style&quot; of Dice Dialogs and menus.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="critical-check" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value to be used to determine a &quot;critical hit.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="critical-miss-check" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value to be used to determine a &quot;critical miss.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="sound" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A sound file to play when this expression is evaluated.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="effect" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A visual effect to render when this expression is evaluated.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="exclude-above" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="exclude-below" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="reroll-above" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be re-rolled.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="reroll-above-save" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded, but the number of discardings is retained.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="reroll-below-save" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded, but the number of discardings is retained.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="success-above" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value which, if the expression evaluates in excess of, will indicate success.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="success-below" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A value which, if the expression evaluates lower than, will indicate success.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="no-damage" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field that indicates to the program that this expression should never be considered to adjust hit points.

This is useful for expressions of the &quot;spell&quot; variety that may or may not adjust hit points.  By indicating to the program where it can look for a hint, it is better able to determine whether or not to adjust hit points.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="quantity" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field where the program can look for quantity information.

The notion of &quot;quantity&quot; applies to an expression that, with a single evaluation, may disberse its results amongst various targets.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="check-availability">
                                    <xs:annotation>
                                      <xs:documentation>This clause instructs the program where to look to determine if the expression is available for evaluation.

If not present, then an expression is always considered to be available.
</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="0" name="memorized" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="cost" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; may be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="check-against" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of a field, in the same row as the &quot;compare-to&quot; field, whose value will be used to compare against.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                          <xs:annotation>
                                            <xs:documentation>Flag that indicates whether availability fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modify-on-roll">
                                    <xs:annotation>
                                      <xs:documentation>This clause instructs the program where to look to determine what fields should have their contents modified when this expression is evaluated.</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="0" name="memorized" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="cost" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; will be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" name="modify-field" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The ID of the field to be modified.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                          <xs:annotation>
                                            <xs:documentation>Flag that indicates whether modification fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="1" name="actionable-def">
                                    <xs:annotation>
                                      <xs:documentation>This clause allows you to give the program a hint regarding which piece of multi-part expression should be used for hit point adjustment.

Primarily intended for expressions of the &quot;spell&quot; type, this clause is prone to failure.  The problem arises from the fact that a &quot;spell&quot; type can contain any number of expression pieces, any one of which (or none of which) may actually cause a hit point adjustment.

The &quot;no-damage&quot; tag is a refinement of this situation, but can not act alone.
</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="1" maxOccurs="1" name="total-clauses" type="xs:integer">
                                          <xs:annotation>
                                            <xs:documentation>The total number of pieces that this expression is expected to contain.

If the expression does not actually contain this many pieces, then no hit point adjustment will be done.
</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="1" maxOccurs="1" name="use-clause" type="xs:integer">
                                          <xs:annotation>
                                            <xs:documentation>The piece of the expression that should be used for hit point adjustment.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="color" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The color to use when issuing the the chat message when this expression is evaluated.

This represents a &quot;default,&quot; which can be overridding by various other settings in the program.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="minimum" type="xs:integer">
                                    <xs:annotation>
                                      <xs:documentation>A minimum possible value for this expression.  If the expression is evaluated and the results is below this minimum, then the minimum value is used instead of the actual results.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="parse-script" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a script to be executed when this expression is evaluated.

If this script returns a result, that result will be used instead of anything that the expression would otherwise generate.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="post-script" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The name of a script to execute after this expression has been evaluated.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="parse-script-ex">
                                    <xs:annotation>
                                      <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The script file name to execute.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                          <xs:annotation>
                                            <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                          </xs:annotation>

                                          <xs:complexType>
                                            <xs:sequence>
                                              <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                <xs:annotation>
                                                  <xs:documentation>An individual script variable.</xs:documentation>
                                                </xs:annotation>

                                                <xs:complexType>
                                                  <xs:sequence>
                                                    <xs:element minOccurs="1" name="name" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                    <xs:element minOccurs="1" name="value" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The value of the declared varible.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                  </xs:sequence>

                                                </xs:complexType>

                                              </xs:element>

                                            </xs:sequence>

                                          </xs:complexType>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="post-script-ex">
                                    <xs:annotation>
                                      <xs:documentation>A clause that defines a script to be executed after the expression is evaluated.

This differs from the &quot;post-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The script file name to execute.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                          <xs:annotation>
                                            <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                          </xs:annotation>

                                          <xs:complexType>
                                            <xs:sequence>
                                              <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                <xs:annotation>
                                                  <xs:documentation>An individual script variable.</xs:documentation>
                                                </xs:annotation>

                                                <xs:complexType>
                                                  <xs:sequence>
                                                    <xs:element minOccurs="1" name="name" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                    <xs:element minOccurs="1" name="value" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The value of the declared varible.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                  </xs:sequence>

                                                </xs:complexType>

                                              </xs:element>

                                            </xs:sequence>

                                          </xs:complexType>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="rep-expr" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>A replacement expression that will replace the base expression with its value.

This is a special-purpose tag whose intention is to allow you to replace the die portion of an expression with something else.
</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="static-label-script-ex">
                                    <xs:annotation>
                                      <xs:documentation>A clause that defines a script to be executed to build an expression's label.

Unlike &quot;parse&quot; scripts, the script referenced by this tag must contain a &quot;getLabel()&quot; method that returns a String.  This string will be used, unaltered, in the program's interface to represent the expression.
</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The script file name to execute.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                          <xs:annotation>
                                            <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                          </xs:annotation>

                                          <xs:complexType>
                                            <xs:sequence>
                                              <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                <xs:annotation>
                                                  <xs:documentation>An individual script variable.</xs:documentation>
                                                </xs:annotation>

                                                <xs:complexType>
                                                  <xs:sequence>
                                                    <xs:element minOccurs="1" name="name" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                    <xs:element minOccurs="1" name="value" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The value of the declared varible.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                  </xs:sequence>

                                                </xs:complexType>

                                              </xs:element>

                                            </xs:sequence>

                                          </xs:complexType>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                </xs:choice>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="1" name="filter" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>A special interface element that adds a filter/search field to the tab of the Dice Panel.

When the user types text info this field, any rolls that do not match the entered text will be hidden.
</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="check-hit">
                      <xs:annotation>
                        <xs:documentation>This clause defines where the program should look to determine hits or misses when an expression of type &quot;attack&quot; is evaluated.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="ac-type" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The ID of the field whose value will be checked to determine whether the roll hits or misses.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="reduced-by">
                            <xs:annotation>
                              <xs:documentation>This clause allows you to tell the program where to look for information that might reduce the overall roll before determining a hit or miss.</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="1" name="field" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field that contains information about reducing the &quot;to hit&quot; roll.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" default="false" name="reduce-on-use" type="xs:boolean">
                                  <xs:annotation>
                                    <xs:documentation>Flag indicating that the value retrieved from the &quot;field&quot; field should, itself, be reduced by the amount of reduction applied.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="apply-damage">
                      <xs:annotation>
                        <xs:documentation>This clause tells the program where to look when an expression of type &quot;damage&quot; is evaluated.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" name="hp-type" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The ID of the field whose value will be adjusted when an expression of type &quot;damage&quot; is evaluated.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" maxOccurs="unbounded" name="reduced-by">
                            <xs:annotation>
                              <xs:documentation>This clause allows you to tell the program where to look for information that might reduce the overall amount of adjustment applied to the &quot;hp-type&quot; field.</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" name="field" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field that contains information about reducing the amount of damage potentially applied.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" default="false" name="reduce-on-use" type="xs:boolean">
                                  <xs:annotation>
                                    <xs:documentation>Flag indicating that the value retrieved from the &quot;field&quot; field should, itself, be reduced by the amount of reduction applied.

For example, let's imagine that an Icon has a magical item that absorbs up to one hundred points of damage before turning to ash.  Every time this item is used, the &quot;reduce-on-use&quot; flag indicates to the program that it should subtract the amount of reduced damage from the value contained in the &quot;field&quot; field.
</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" name="spell-setup">
                      <xs:annotation>
                        <xs:documentation>This is a special interface element that places a button on the tab that accesses &quot;spell&quot; setup.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" name="label" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The label to be placed in the button that is rendered on the tab.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="spell-level-source">
                            <xs:annotation>
                              <xs:documentation>This clause defines for the program where to look for spell level information.

In order to operate correctly, &quot;spell-setup&quot; must have a variety of information, including where to find spell level names, where the maximum number of spells of that level can be found and what the current number of spells of that level are found.
</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" name="table-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the table that contains spell level information.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="name-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the name of the spell level is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="max-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the maximum number of spells of this level is stored.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="cur-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the current number of spells of this level is stored.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                          <xs:element minOccurs="0" name="spell-source">
                            <xs:annotation>
                              <xs:documentation>The ID of the table that contains the actual spell information.</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" name="table-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the table where spells are located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="name-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the name of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="desc-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the description/expression of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="level-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the level of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="cost-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the cost (how many spell slots the spell requires) of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="mem-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the number currently &quot;memorized&quot; of this spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this button should only be rendered if the program is running in Master mode.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this button should never be rendered.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" name="use-name-in-tab" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>Flag indicating whether the tab's &quot;name&quot; should be placed in the tab along with an icon.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                  </xs:choice>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="unbounded" name="editable-tables">
        <xs:annotation>
          <xs:documentation>Definition of tables that can be edited outside of the character sheet.

&quot;Outside of the character sheet&quot; refers to bringing up a dialog in the program that contains the table just as it would appear on the character sheet.

Accepting changes to this &quot;floating&quot; table will apply the changes to the character sheet, just as if you had editing the sheet directly.
</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="editable-table">
              <xs:annotation>
                <xs:documentation>A table that can be edited.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:element minOccurs="0" name="label" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A label to display to the user indicating the table in question.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="table-id" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>The ID of the table to be edited.</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                  <xs:element minOccurs="0" name="keyboard-shortcut" type="xs:string">
                    <xs:annotation>
                      <xs:documentation>A single character shortcut for editing this table.

Due to the way that keyboard shortcuts are processed, you must select one that is not already in use by some other function of the program.

Note that you may not define qualifiers to this shortcut -- only a single character is allowed.
</xs:documentation>
                    </xs:annotation>

                  </xs:element>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="unbounded" name="page">
        <xs:annotation>
          <xs:documentation>A &quot;page&quot; (tab) of the character sheet.</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" name="section">
              <xs:annotation>
                <xs:documentation>A &quot;section&quot; is a logical and visual division in how a character sheet is displayed.  By grouping items within sections you convey flow to the user.</xs:documentation>
              </xs:annotation>

              <xs:complexType>
                <xs:sequence>
                  <xs:choice maxOccurs="unbounded">
                    <xs:element minOccurs="0" name="name" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The label to assign to this section.  This label is rendered at the top of a border outline for the section.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" name="layout">
                      <xs:annotation>
                        <xs:documentation>The value of this tag can be one of &quot;full,&quot; &quot;half&quot; or &quot;third.&quot;

This tag provides guidance to the program when it lays out components on the character sheet.

If set to &quot;full,&quot; then this section is expected to stretch the full width of the page.  If set to &quot;half,&quot; then the next section whose layout is also set to &quot;half&quot; will be laid out next to this section, each taking up half of the available space.

Likewise, if set to &quot;third,&quot; then this section and the next two will share the horizontal space available on the page.
</xs:documentation>
                      </xs:annotation>

                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                        </xs:restriction>

                      </xs:simpleType>

                    </xs:element>

                    <xs:element minOccurs="0" name="orientation" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The value of this tag can be either &quot;horizontal&quot; or &quot;vertical&quot; and applies to how things contained in the section are laid out on the screen.

If set to &quot;horizontal,&quot; then items in the section are laid out across the page.  If set to &quot;vertical,&quot; then items are laid out down the page.
</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" name="title-color" type="xs:string">
                      <xs:annotation>
                        <xs:documentation>The color to use when rendering this section's name.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>Flag indicating that this section should only appear to the Master.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>Flag indicating that this section should never be rendered.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" name="portrait" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>A place-holder tag that indicates to the program that it should replace the tag with the Icon's current image.</xs:documentation>
                      </xs:annotation>

                    </xs:element>

                    <xs:element minOccurs="0" name="file-field">
                      <xs:annotation>
                        <xs:documentation>A special tag that creates a compound component for selecting a file.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" name="name" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The label used to identify this field on the charcter sheet.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="id" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>An optional ID for this field so its contents can be referenced elsewhere on the sheet.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="file-filter">
                            <xs:annotation>
                              <xs:documentation>This clause allows you to define a filter to be applied to the file dialog that is a part of the &quot;file-field.&quot;</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" name="name" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The name of this filter, which will be displayed in the file dialog.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="init-dir" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>A path representing the initial location where the file dialog will open.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" maxOccurs="unbounded" name="filter" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>A filtering agent.  Each instance of this tag represents a type of file that the file dialog will accept and display.

The value of this tag should contain the extension of the files of interest, without any periods.

For example, for WAV sound files, you would set this filter's value to &quot;wav&quot; and not &quot;.wav.&quot;
</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                          <xs:element minOccurs="0" name="tag" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The tag to use when saving this clause's data.  Without a tag, data contained in this field will not be preserved.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="size" type="xs:integer">
                            <xs:annotation>
                              <xs:documentation>The number of columns the text component of this field should use.  Depending on the layout of the sheet, this value may or may not be honored.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="token-name" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>An optional identifier that makes the contents of this field available to expressions.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this field should only appear to the Master.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this field should never be rendered.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="field">
                      <xs:annotation>
                        <xs:documentation>This clause creates a stand-alone text field for storing individual information.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:choice maxOccurs="unbounded">
                            <xs:element minOccurs="0" name="name" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A label to associate with this field.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="tag" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A unique identifier for saving this field's contents.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="id" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>An optional identifier so that the contents of this field can be referenced elsewhere in the definition.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this field should only appear to the Master.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this field should never be rendered.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="array-list" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The ID of a previously defined &quot;array&quot; whose values are available to this field.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="foreground" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A color to use for the foreground text of this field.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="background" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A color to use for the background this field.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="default" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A default value for this field.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="token-name" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A unique identifier that allows the contents of this field to be referenced by the contents of other fields.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="double-value" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag that indicates that the contents of this field are expected to be in the format of a double precision number.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="string-value" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag that indicates that the contents of this field are expected to be a string.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="bool-value" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag that indicates that the contents of this field are expected to be in the format of a boolean (true/false).</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="size" type="xs:integer">
                              <xs:annotation>
                                <xs:documentation>The number of columns that this field should occupy.  Depending on the layout of the character sheet, this value may not be honored.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="tooltip" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A tooltip to apply to this field.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="modifiers">
                              <xs:annotation>
                                <xs:documentation>A list of field IDs whose values can modify another field's value.</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field whose contents will directly modify the value of the associated field.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-positive" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field which contains data whose absolute value will positively modify the value of the associated field.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-negative" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The ID of a field which contains data whose absolute value will negatively modify the value of the associated field.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-script">
                                    <xs:annotation>
                                      <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                    </xs:annotation>

                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                          <xs:annotation>
                                            <xs:documentation>The script file name to execute.</xs:documentation>
                                          </xs:annotation>

                                        </xs:element>

                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                          <xs:annotation>
                                            <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                          </xs:annotation>

                                          <xs:complexType>
                                            <xs:sequence>
                                              <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                <xs:annotation>
                                                  <xs:documentation>An individual script variable.</xs:documentation>
                                                </xs:annotation>

                                                <xs:complexType>
                                                  <xs:sequence>
                                                    <xs:element minOccurs="1" name="name" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                    <xs:element minOccurs="1" name="value" type="xs:string">
                                                      <xs:annotation>
                                                        <xs:documentation>The value of the declared varible.</xs:documentation>
                                                      </xs:annotation>

                                                    </xs:element>

                                                  </xs:sequence>

                                                </xs:complexType>

                                              </xs:element>

                                            </xs:sequence>

                                          </xs:complexType>

                                        </xs:element>

                                      </xs:sequence>

                                    </xs:complexType>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="expression">
                              <xs:annotation>
                                <xs:documentation>A button placed at the top of this tab.

A button is, essentially, an expression that is evaluated when the button is pressed.

Note that the various tags and labels associated with a button are meant to contain not simple literal values, but also tokens or IDs of other fields.  In this fashion you can define expressions that reference data contained in other places on the character sheet.
</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:choice maxOccurs="unbounded">
                                    <xs:element minOccurs="0" name="button-label" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The label to render on the face of this button.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="type" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The type of expression/button.  Only one of a perdefined list of types are supported.

These types are:

  button - an expression with no special handling
  toggle  - an expression that is added to some other expression
  init        - an initiative experssion
  attrib    - an attribute expression
  save     - a save expression
  attack   - an attack expression
  damage - a damage expression
  spell       - a spell expression
  skill         - a skill expression
  clc          - a &quot;caster level check&quot; expression
  custom   - a custom expression
  info         - an informative expression (does not roll)

Not all the expression types indicate that special handling is done, but by specifying the correct type, you indicate to the program that certain handling is expected and, should this handling be expanded in the future, you will be able to take advantage of it without further alteration.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="type-for-button" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>You can use this tag to specify an alternate type for this expression.  This alternate type will only be used for selecting the image to use for the expression's button in the Dice Dialog.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="raw-label" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The &quot;raw&quot; or &quot;base&quot; identification of this expression.  When multiple Icons are selected and a roll performed, the program will evaluate whether all the Icons have matching expressions based on this label.

As such, it should not contain any information specify to a particular Icon.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="exclude-value" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that any value associated with this field/button should be excluded from the expression.

This is especially useful for items that do not actually have any particular value (like buttons) or fields that contain something that will not actually be used in the expression.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="ignore-targets" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that when this expression is evaluated, any targets that the issuing Icon has should be ignored.

This is useful for &quot;skill&quot; and similar expression types that are not evaluated &quot;against&quot; a target, but might be rolled while the Icon is targeting someone.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="low-to-succeed" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a low result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="true" name="high-to-succeed" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a high result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="discard-remainder" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be discarded.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="remainder-round-down" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result down to the next lowest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="remainder-roiund-up" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result up to the next highest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="hit-sound" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="miss-sound" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="critical-hit-sound" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="critical-miss-sound" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="damage-sound" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;damage.&quot;
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="spell-sound" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;spell.&quot;
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="applied-effect" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a pre-defined Icon Effect to apply to the targeted Icon when this expression is evaluated.

Pre-defined Icon Effects are set up by the Master and maintained by him.  In order to be applied, the value of this tag must match exactly the description of a pre-defined Icon Effect.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="hand" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>Reference to where &quot;hand&quot; information about the expression can be retrieved.

This information is used by the program when rendering various aspects of an expression to pass information on to the user.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="desc-label" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A descriptive labe for this expression.  This is only used for &quot;old style&quot; expression menus.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="target-value" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The &quot;target&quot; that the expression should be evaluated against.

For game systems that support this notion, this value contributes to the program determining whether the result of the expression evaluates to success or failure.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="pre-roll" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A piece of the expression to be inserted before the main portion of the expression is built.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="post-roll" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A piece of the expression to be inserted after the main portion of the expression is built.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="pre-expr" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A piece of the expression that is inserted immediately prior to the main expression.

Where &quot;pre-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="post-expr" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A piece of the expression that is inserted immediately after the main expression.

Where &quot;post-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="die-to-use" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The ID of a previously defined die to be used as the main payload of this expression.

For &quot;custom,&quot; &quot;spell&quot; and &quot;button&quot; expression types, it is assumed that no predefined die will be used, so this tag is generally ignored.  For other expression types, however, this makes up the bulk of the expression's payload.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="static-label" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A label that is used in the &quot;old style&quot; of Dice Dialogs and menus.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="critical-check" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value to be used to determine a &quot;critical hit.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="critical-miss-check" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value to be used to determine a &quot;critical miss.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="sound" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A sound file to play when this expression is evaluated.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="effect" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A visual effect to render when this expression is evaluated.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="exclude-above" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="exclude-below" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="reroll-above" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be re-rolled.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="reroll-above-save" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded, but the number of discardings is retained.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="reroll-below-save" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded, but the number of discardings is retained.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="success-above" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value which, if the expression evaluates in excess of, will indicate success.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="success-below" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A value which, if the expression evaluates lower than, will indicate success.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="no-damage" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The ID of a field that indicates to the program that this expression should never be considered to adjust hit points.

This is useful for expressions of the &quot;spell&quot; variety that may or may not adjust hit points.  By indicating to the program where it can look for a hint, it is better able to determine whether or not to adjust hit points.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="quantity" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The ID of a field where the program can look for quantity information.

The notion of &quot;quantity&quot; applies to an expression that, with a single evaluation, may disberse its results amongst various targets.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="check-availability">
                                      <xs:annotation>
                                        <xs:documentation>This clause instructs the program where to look to determine if the expression is available for evaluation.

If not present, then an expression is always considered to be available.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="0" name="memorized" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="cost" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; may be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="check-against" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field, in the same row as the &quot;compare-to&quot; field, whose value will be used to compare against.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                            <xs:annotation>
                                              <xs:documentation>Flag that indicates whether availability fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="modify-on-roll">
                                      <xs:annotation>
                                        <xs:documentation>This clause instructs the program where to look to determine what fields should have their contents modified when this expression is evaluated.</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="0" name="memorized" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="cost" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; will be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="modify-field" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of the field to be modified.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                            <xs:annotation>
                                              <xs:documentation>Flag that indicates whether modification fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="1" name="actionable-def">
                                      <xs:annotation>
                                        <xs:documentation>This clause allows you to give the program a hint regarding which piece of multi-part expression should be used for hit point adjustment.

Primarily intended for expressions of the &quot;spell&quot; type, this clause is prone to failure.  The problem arises from the fact that a &quot;spell&quot; type can contain any number of expression pieces, any one of which (or none of which) may actually cause a hit point adjustment.

The &quot;no-damage&quot; tag is a refinement of this situation, but can not act alone.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="1" maxOccurs="1" name="total-clauses" type="xs:integer">
                                            <xs:annotation>
                                              <xs:documentation>The total number of pieces that this expression is expected to contain.

If the expression does not actually contain this many pieces, then no hit point adjustment will be done.
</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="1" maxOccurs="1" name="use-clause" type="xs:integer">
                                            <xs:annotation>
                                              <xs:documentation>The piece of the expression that should be used for hit point adjustment.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="color" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The color to use when issuing the the chat message when this expression is evaluated.

This represents a &quot;default,&quot; which can be overridding by various other settings in the program.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="minimum" type="xs:integer">
                                      <xs:annotation>
                                        <xs:documentation>A minimum possible value for this expression.  If the expression is evaluated and the results is below this minimum, then the minimum value is used instead of the actual results.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="parse-script" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a script to be executed when this expression is evaluated.

If this script returns a result, that result will be used instead of anything that the expression would otherwise generate.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="post-script" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The name of a script to execute after this expression has been evaluated.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="parse-script-ex">
                                      <xs:annotation>
                                        <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The script file name to execute.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                            <xs:annotation>
                                              <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                            </xs:annotation>

                                            <xs:complexType>
                                              <xs:sequence>
                                                <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                  <xs:annotation>
                                                    <xs:documentation>An individual script variable.</xs:documentation>
                                                  </xs:annotation>

                                                  <xs:complexType>
                                                    <xs:sequence>
                                                      <xs:element minOccurs="1" name="name" type="xs:string">
                                                        <xs:annotation>
                                                          <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                        </xs:annotation>

                                                      </xs:element>

                                                      <xs:element minOccurs="1" name="value" type="xs:string">
                                                        <xs:annotation>
                                                          <xs:documentation>The value of the declared varible.</xs:documentation>
                                                        </xs:annotation>

                                                      </xs:element>

                                                    </xs:sequence>

                                                  </xs:complexType>

                                                </xs:element>

                                              </xs:sequence>

                                            </xs:complexType>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="post-script-ex">
                                      <xs:annotation>
                                        <xs:documentation>A clause that defines a script to be executed after the expression is evaluated.

This differs from the &quot;post-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The script file name to execute.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                            <xs:annotation>
                                              <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                            </xs:annotation>

                                            <xs:complexType>
                                              <xs:sequence>
                                                <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                  <xs:annotation>
                                                    <xs:documentation>An individual script variable.</xs:documentation>
                                                  </xs:annotation>

                                                  <xs:complexType>
                                                    <xs:sequence>
                                                      <xs:element minOccurs="1" name="name" type="xs:string">
                                                        <xs:annotation>
                                                          <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                        </xs:annotation>

                                                      </xs:element>

                                                      <xs:element minOccurs="1" name="value" type="xs:string">
                                                        <xs:annotation>
                                                          <xs:documentation>The value of the declared varible.</xs:documentation>
                                                        </xs:annotation>

                                                      </xs:element>

                                                    </xs:sequence>

                                                  </xs:complexType>

                                                </xs:element>

                                              </xs:sequence>

                                            </xs:complexType>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="static-label-script-ex">
                                      <xs:annotation>
                                        <xs:documentation>A clause that defines a script to be executed to build an expression's label.

Unlike &quot;parse&quot; scripts, the script referenced by this tag must contain a &quot;getLabel()&quot; method that returns a String.  This string will be used, unaltered, in the program's interface to represent the expression.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The script file name to execute.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                            <xs:annotation>
                                              <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                            </xs:annotation>

                                            <xs:complexType>
                                              <xs:sequence>
                                                <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                  <xs:annotation>
                                                    <xs:documentation>An individual script variable.</xs:documentation>
                                                  </xs:annotation>

                                                  <xs:complexType>
                                                    <xs:sequence>
                                                      <xs:element minOccurs="1" name="name" type="xs:string">
                                                        <xs:annotation>
                                                          <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                        </xs:annotation>

                                                      </xs:element>

                                                      <xs:element minOccurs="1" name="value" type="xs:string">
                                                        <xs:annotation>
                                                          <xs:documentation>The value of the declared varible.</xs:documentation>
                                                        </xs:annotation>

                                                      </xs:element>

                                                    </xs:sequence>

                                                  </xs:complexType>

                                                </xs:element>

                                              </xs:sequence>

                                            </xs:complexType>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                  </xs:choice>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="1" name="dot-field">
                              <xs:annotation>
                                <xs:documentation>A special interface component that renders as a series of &quot;dots&quot; that can be either selected or unselected.

This is intended for game systems that support this special way of tracking data.
</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="0" name="minimum" type="xs:integer">
                                    <xs:annotation>
                                      <xs:documentation>The minimum number of &quot;dots&quot; that can be selected.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                  <xs:element minOccurs="0" name="maximum" type="xs:integer">
                                    <xs:annotation>
                                      <xs:documentation>The maximum number of &quot;dots&quot; to render.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                          </xs:choice>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="list-pair">
                      <xs:annotation>
                        <xs:documentation>This clause creates a table with a read-only first column and a second column that contains editable data.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:choice maxOccurs="unbounded">
                            <xs:element minOccurs="0" name="name" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A label to associate with this table.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="title-color" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A color to use when rendering this table's name.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="id" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>An optional identifier so that the contents of this table can be referenced elsewhere in the definition.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="read-only" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that the contents of this table can not be edited via the character sheet.

Setting this flag indicates that the only way to alter the contents of this table is programmatically.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this table should only appear to the Master.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this table should never be rendered.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="table-tag" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A unique identifier for saving this table's contents.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="first-column-size" type="xs:integer">
                              <xs:annotation>
                                <xs:documentation>A hint as to how wide to make the first column of the table.  Depending on the layout of the charcter sheet, this value may not be honored.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="second-column-size" type="xs:integer">
                              <xs:annotation>
                                <xs:documentation>A hint as to how wide to make the second column of the table.  Depending on the layout of the charcter sheet, this value may not be honored.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="table-row">
                              <xs:annotation>
                                <xs:documentation>This clause defines a row of the table.</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:choice maxOccurs="unbounded">
                                    <xs:element minOccurs="0" name="name" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A label to associate with this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="tag" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A unique identifier for saving this field's contents.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="id" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>An optional identifier so that the contents of this field can be referenced elsewhere in the definition.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="array-list" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The ID of a previously defined &quot;array&quot; whose values are available to this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="foreground" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A color to use for the foreground text of this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="background" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A color to use for the background this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="default" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A default value for this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="1" name="read-only" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that this row should be &quot;read only.&quot;

A &quot;read only&quot; row's data can not be modified through the program's character sheet interface, but can be modified programmatically via scripts or other indirect methods.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="token-name" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A unique identifier that allows the contents of this field to be referenced by the contents of other fields.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="double-value" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag that indicates that the contents of this field are expected to be in the format of a double precision number.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="string-value" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag that indicates that the contents of this field are expected to be a string.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="bool-value" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag that indicates that the contents of this field are expected to be in the format of a boolean (true/false).</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="size" type="xs:integer">
                                      <xs:annotation>
                                        <xs:documentation>The number of columns that this field should occupy.  Depending on the layout of the character sheet, this value may not be honored.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="tooltip" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A tooltip to apply to this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="modifiers">
                                      <xs:annotation>
                                        <xs:documentation>A list of field IDs whose values can modify another field's value.</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field whose contents will directly modify the value of the associated field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-positive" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field which contains data whose absolute value will positively modify the value of the associated field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-negative" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field which contains data whose absolute value will negatively modify the value of the associated field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-script">
                                            <xs:annotation>
                                              <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                            </xs:annotation>

                                            <xs:complexType>
                                              <xs:sequence>
                                                <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                  <xs:annotation>
                                                    <xs:documentation>The script file name to execute.</xs:documentation>
                                                  </xs:annotation>

                                                </xs:element>

                                                <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                  <xs:annotation>
                                                    <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                  </xs:annotation>

                                                  <xs:complexType>
                                                    <xs:sequence>
                                                      <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                        <xs:annotation>
                                                          <xs:documentation>An individual script variable.</xs:documentation>
                                                        </xs:annotation>

                                                        <xs:complexType>
                                                          <xs:sequence>
                                                            <xs:element minOccurs="1" name="name" type="xs:string">
                                                              <xs:annotation>
                                                                <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                              </xs:annotation>

                                                            </xs:element>

                                                            <xs:element minOccurs="1" name="value" type="xs:string">
                                                              <xs:annotation>
                                                                <xs:documentation>The value of the declared varible.</xs:documentation>
                                                              </xs:annotation>

                                                            </xs:element>

                                                          </xs:sequence>

                                                        </xs:complexType>

                                                      </xs:element>

                                                    </xs:sequence>

                                                  </xs:complexType>

                                                </xs:element>

                                              </xs:sequence>

                                            </xs:complexType>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="expression">
                                      <xs:annotation>
                                        <xs:documentation>A button placed at the top of this tab.

A button is, essentially, an expression that is evaluated when the button is pressed.

Note that the various tags and labels associated with a button are meant to contain not simple literal values, but also tokens or IDs of other fields.  In this fashion you can define expressions that reference data contained in other places on the character sheet.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:choice maxOccurs="unbounded">
                                            <xs:element minOccurs="0" name="button-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The label to render on the face of this button.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="button-sub-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>An additional label to render on the face of this button when it is placed in a Dice Panel.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="type" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The type of expression/button.  Only one of a perdefined list of types are supported.

These types are:

  button - an expression with no special handling
  toggle  - an expression that is added to some other expression
  init        - an initiative experssion
  attrib    - an attribute expression
  save     - a save expression
  attack   - an attack expression
  damage - a damage expression
  spell       - a spell expression
  skill         - a skill expression
  clc          - a &quot;caster level check&quot; expression
  custom   - a custom expression
  info         - an informative expression (does not roll)

Not all the expression types indicate that special handling is done, but by specifying the correct type, you indicate to the program that certain handling is expected and, should this handling be expanded in the future, you will be able to take advantage of it without further alteration.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="type-for-button" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>You can use this tag to specify an alternate type for this expression.  This alternate type will only be used for selecting the image to use for the expression's button in the Dice Dialog.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="raw-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The &quot;raw&quot; or &quot;base&quot; identification of this expression.  When multiple Icons are selected and a roll performed, the program will evaluate whether all the Icons have matching expressions based on this label.

As such, it should not contain any information specify to a particular Icon.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="exclude-value" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that any value associated with this field/button should be excluded from the expression.

This is especially useful for items that do not actually have any particular value (like buttons) or fields that contain something that will not actually be used in the expression.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="ignore-targets" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that when this expression is evaluated, any targets that the issuing Icon has should be ignored.

This is useful for &quot;skill&quot; and similar expression types that are not evaluated &quot;against&quot; a target, but might be rolled while the Icon is targeting someone.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="low-to-succeed" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a low result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="true" name="high-to-succeed" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a high result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="discard-remainder" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be discarded.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="remainder-round-down" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result down to the next lowest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="remainder-roiund-up" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result up to the next highest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="hit-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="miss-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-hit-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-miss-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="damage-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;damage.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="spell-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;spell.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="applied-effect" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a pre-defined Icon Effect to apply to the targeted Icon when this expression is evaluated.

Pre-defined Icon Effects are set up by the Master and maintained by him.  In order to be applied, the value of this tag must match exactly the description of a pre-defined Icon Effect.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="hand" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>Reference to where &quot;hand&quot; information about the expression can be retrieved.

This information is used by the program when rendering various aspects of an expression to pass information on to the user.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="1" name="armed" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a field that indicates whether this item is considered to be &quot;armed&quot; (ie, ready for use).

A state of &quot;armed&quot; does not really impact the behavior of the program, unless the Master has set the Preferences option that forces an expression to be &quot;armed&quot; before it will be evaluated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="desc-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A descriptive labe for this expression.  This is only used for &quot;old style&quot; expression menus.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="target-value" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The &quot;target&quot; that the expression should be evaluated against.

For game systems that support this notion, this value contributes to the program determining whether the result of the expression evaluates to success or failure.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="pre-roll" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression to be inserted before the main portion of the expression is built.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="post-roll" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression to be inserted after the main portion of the expression is built.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="pre-expr" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression that is inserted immediately prior to the main expression.

Where &quot;pre-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="post-expr" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression that is inserted immediately after the main expression.

Where &quot;post-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="die-to-use" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a previously defined die to be used as the main payload of this expression.

For &quot;custom,&quot; &quot;spell&quot; and &quot;button&quot; expression types, it is assumed that no predefined die will be used, so this tag is generally ignored.  For other expression types, however, this makes up the bulk of the expression's payload.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="static-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A label that is used in the &quot;old style&quot; of Dice Dialogs and menus.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-check" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value to be used to determine a &quot;critical hit.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-miss-check" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value to be used to determine a &quot;critical miss.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A sound file to play when this expression is evaluated.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="effect" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A visual effect to render when this expression is evaluated.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="exclude-above" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="exclude-below" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="reroll-above" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be re-rolled.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="reroll-above-save" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded, but the number of discardings is retained.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="reroll-below-save" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded, but the number of discardings is retained.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="success-above" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression evaluates in excess of, will indicate success.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="success-below" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression evaluates lower than, will indicate success.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="no-damage" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a field that indicates to the program that this expression should never be considered to adjust hit points.

This is useful for expressions of the &quot;spell&quot; variety that may or may not adjust hit points.  By indicating to the program where it can look for a hint, it is better able to determine whether or not to adjust hit points.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="quantity" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a field where the program can look for quantity information.

The notion of &quot;quantity&quot; applies to an expression that, with a single evaluation, may disberse its results amongst various targets.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="check-availability">
                                              <xs:annotation>
                                                <xs:documentation>This clause instructs the program where to look to determine if the expression is available for evaluation.

If not present, then an expression is always considered to be available.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="0" name="memorized" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; may be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="check-against" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field, in the same row as the &quot;compare-to&quot; field, whose value will be used to compare against.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                                    <xs:annotation>
                                                      <xs:documentation>Flag that indicates whether availability fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="modify-on-roll">
                                              <xs:annotation>
                                                <xs:documentation>This clause instructs the program where to look to determine what fields should have their contents modified when this expression is evaluated.</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="0" name="memorized" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; will be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="modify-field" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field to be modified.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                                    <xs:annotation>
                                                      <xs:documentation>Flag that indicates whether modification fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="1" name="actionable-def">
                                              <xs:annotation>
                                                <xs:documentation>This clause allows you to give the program a hint regarding which piece of multi-part expression should be used for hit point adjustment.

Primarily intended for expressions of the &quot;spell&quot; type, this clause is prone to failure.  The problem arises from the fact that a &quot;spell&quot; type can contain any number of expression pieces, any one of which (or none of which) may actually cause a hit point adjustment.

The &quot;no-damage&quot; tag is a refinement of this situation, but can not act alone.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="total-clauses" type="xs:integer">
                                                    <xs:annotation>
                                                      <xs:documentation>The total number of pieces that this expression is expected to contain.

If the expression does not actually contain this many pieces, then no hit point adjustment will be done.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="1" maxOccurs="1" name="use-clause" type="xs:integer">
                                                    <xs:annotation>
                                                      <xs:documentation>The piece of the expression that should be used for hit point adjustment.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="color" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The color to use when issuing the the chat message when this expression is evaluated.

This represents a &quot;default,&quot; which can be overridding by various other settings in the program.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="minimum" type="xs:integer">
                                              <xs:annotation>
                                                <xs:documentation>A minimum possible value for this expression.  If the expression is evaluated and the results is below this minimum, then the minimum value is used instead of the actual results.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="parse-script" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a script to be executed when this expression is evaluated.

If this script returns a result, that result will be used instead of anything that the expression would otherwise generate.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="post-script" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a script to execute after this expression has been evaluated.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="parse-script-ex">
                                              <xs:annotation>
                                                <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                    <xs:annotation>
                                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                    </xs:annotation>

                                                    <xs:complexType>
                                                      <xs:sequence>
                                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                          <xs:annotation>
                                                            <xs:documentation>An individual script variable.</xs:documentation>
                                                          </xs:annotation>

                                                          <xs:complexType>
                                                            <xs:sequence>
                                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                            </xs:sequence>

                                                          </xs:complexType>

                                                        </xs:element>

                                                      </xs:sequence>

                                                    </xs:complexType>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="post-script-ex">
                                              <xs:annotation>
                                                <xs:documentation>A clause that defines a script to be executed after the expression is evaluated.

This differs from the &quot;post-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                    <xs:annotation>
                                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                    </xs:annotation>

                                                    <xs:complexType>
                                                      <xs:sequence>
                                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                          <xs:annotation>
                                                            <xs:documentation>An individual script variable.</xs:documentation>
                                                          </xs:annotation>

                                                          <xs:complexType>
                                                            <xs:sequence>
                                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                            </xs:sequence>

                                                          </xs:complexType>

                                                        </xs:element>

                                                      </xs:sequence>

                                                    </xs:complexType>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="static-label-script-ex">
                                              <xs:annotation>
                                                <xs:documentation>A clause that defines a script to be executed to build an expression's label.

Unlike &quot;parse&quot; scripts, the script referenced by this tag must contain a &quot;getLabel()&quot; method that returns a String.  This string will be used, unaltered, in the program's interface to represent the expression.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                    <xs:annotation>
                                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                    </xs:annotation>

                                                    <xs:complexType>
                                                      <xs:sequence>
                                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                          <xs:annotation>
                                                            <xs:documentation>An individual script variable.</xs:documentation>
                                                          </xs:annotation>

                                                          <xs:complexType>
                                                            <xs:sequence>
                                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                            </xs:sequence>

                                                          </xs:complexType>

                                                        </xs:element>

                                                      </xs:sequence>

                                                    </xs:complexType>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                          </xs:choice>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="1" name="dot-field">
                                      <xs:annotation>
                                        <xs:documentation>A special interface component that renders as a series of &quot;dots&quot; that can be either selected or unselected.

This is intended for game systems that support this special way of tracking data.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="0" name="minimum" type="xs:integer">
                                            <xs:annotation>
                                              <xs:documentation>The minimum number of &quot;dots&quot; that can be selected.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="maximum" type="xs:integer">
                                            <xs:annotation>
                                              <xs:documentation>The maximum number of &quot;dots&quot; to render.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                  </xs:choice>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                          </xs:choice>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="list-panel">
                      <xs:annotation>
                        <xs:documentation>This clause defines a table that simply contains a list of data.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" name="name" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A label to associate with this table.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this table should only appear to the Master.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this table should never be rendered.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="title-color" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A color to use when rendering this table's name.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="id" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>An optional identifier so that the contents of this table can be referenced elsewhere in the definition.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="table-tag" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>A unique identifier for saving this table's contents.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="row-tag" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>An identifier for saving each row of this table's contents.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="data-tag" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>An identifier for saving the data contained in each row of this table's contents.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="multi-list">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:choice maxOccurs="unbounded">
                            <xs:element minOccurs="0" name="name" type="xs:string"/>
                            <xs:element minOccurs="0" name="title-color" type="xs:string"/>
                            <xs:element minOccurs="0" name="id" type="xs:string"/>
                            <xs:element minOccurs="0" default="false" name="read-only" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that the contents of this table can not be edited via the character sheet.

Setting this flag indicates that the only way to alter the contents of this table is programmatically.
</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this table should only appear to the Master.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this table should never be rendered.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="table-tag" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A unique identifier for saving this table's contents.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="row-tag" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>An identifier for saving each row of this table's contents.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="data-file" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>The name of a file that contains information that can be used to create rows of the table.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="table-column">
                              <xs:annotation>
                                <xs:documentation>This clause defines a column of the table.</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:choice maxOccurs="unbounded">
                                    <xs:element minOccurs="0" name="name" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A label to associate with this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="tag" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A unique identifier for saving this field's contents.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="id" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>An optional identifier so that the contents of this field can be referenced elsewhere in the definition.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="array-list" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>The ID of a previously defined &quot;array&quot; whose values are available to this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="foreground" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A color to use for the foreground text of this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="background" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A color to use for the background this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="default" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A default value for this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="1" name="read-only" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag indicating that this column should be &quot;read only.&quot;

A &quot;read only&quot; column's data can not be modified through the program's character sheet interface, but can be modified programmatically via scripts or other indirect methods.
</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="token-name" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A unique identifier that allows the contents of this field to be referenced by the contents of other fields.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="double-value" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag that indicates that the contents of this field are expected to be in the format of a double precision number.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="string-value" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag that indicates that the contents of this field are expected to be a string.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" default="false" name="bool-value" type="xs:boolean">
                                      <xs:annotation>
                                        <xs:documentation>Flag that indicates that the contents of this field are expected to be in the format of a boolean (true/false).</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="size" type="xs:integer">
                                      <xs:annotation>
                                        <xs:documentation>The number of columns that this field should occupy.  Depending on the layout of the character sheet, this value may not be honored.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" name="tooltip" type="xs:string">
                                      <xs:annotation>
                                        <xs:documentation>A tooltip to apply to this field.</xs:documentation>
                                      </xs:annotation>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="modifiers">
                                      <xs:annotation>
                                        <xs:documentation>A list of field IDs whose values can modify another field's value.</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field whose contents will directly modify the value of the associated field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-positive" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field which contains data whose absolute value will positively modify the value of the associated field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-negative" type="xs:string">
                                            <xs:annotation>
                                              <xs:documentation>The ID of a field which contains data whose absolute value will negatively modify the value of the associated field.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" maxOccurs="unbounded" name="modifier-script">
                                            <xs:annotation>
                                              <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                            </xs:annotation>

                                            <xs:complexType>
                                              <xs:sequence>
                                                <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                  <xs:annotation>
                                                    <xs:documentation>The script file name to execute.</xs:documentation>
                                                  </xs:annotation>

                                                </xs:element>

                                                <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                  <xs:annotation>
                                                    <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                  </xs:annotation>

                                                  <xs:complexType>
                                                    <xs:sequence>
                                                      <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                        <xs:annotation>
                                                          <xs:documentation>An individual script variable.</xs:documentation>
                                                        </xs:annotation>

                                                        <xs:complexType>
                                                          <xs:sequence>
                                                            <xs:element minOccurs="1" name="name" type="xs:string">
                                                              <xs:annotation>
                                                                <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                              </xs:annotation>

                                                            </xs:element>

                                                            <xs:element minOccurs="1" name="value" type="xs:string">
                                                              <xs:annotation>
                                                                <xs:documentation>The value of the declared varible.</xs:documentation>
                                                              </xs:annotation>

                                                            </xs:element>

                                                          </xs:sequence>

                                                        </xs:complexType>

                                                      </xs:element>

                                                    </xs:sequence>

                                                  </xs:complexType>

                                                </xs:element>

                                              </xs:sequence>

                                            </xs:complexType>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="expression">
                                      <xs:annotation>
                                        <xs:documentation>A button placed at the top of this tab.

A button is, essentially, an expression that is evaluated when the button is pressed.

Note that the various tags and labels associated with a button are meant to contain not simple literal values, but also tokens or IDs of other fields.  In this fashion you can define expressions that reference data contained in other places on the character sheet.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:choice maxOccurs="unbounded">
                                            <xs:element minOccurs="0" name="button-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The label to render on the face of this button.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="button-sub-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>An additional label to render on the face of this button when it is placed in a Dice Panel.

This value can contain tokens and field IDs, which will be evaluated and expanded when the label is rendered.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="type" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The type of expression/button.  Only one of a perdefined list of types are supported.

These types are:

  button - an expression with no special handling
  toggle  - an expression that is added to some other expression
  init        - an initiative experssion
  attrib    - an attribute expression
  save     - a save expression
  attack   - an attack expression
  damage - a damage expression
  spell       - a spell expression
  skill         - a skill expression
  clc          - a &quot;caster level check&quot; expression
  custom   - a custom expression
  info         - an informative expression (does not roll)

Not all the expression types indicate that special handling is done, but by specifying the correct type, you indicate to the program that certain handling is expected and, should this handling be expanded in the future, you will be able to take advantage of it without further alteration.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="type-for-button" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>You can use this tag to specify an alternate type for this expression.  This alternate type will only be used for selecting the image to use for the expression's button in the Dice Dialog.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="raw-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The &quot;raw&quot; or &quot;base&quot; identification of this expression.  When multiple Icons are selected and a roll performed, the program will evaluate whether all the Icons have matching expressions based on this label.

As such, it should not contain any information specify to a particular Icon.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="exclude-value" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that any value associated with this field/button should be excluded from the expression.

This is especially useful for items that do not actually have any particular value (like buttons) or fields that contain something that will not actually be used in the expression.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="ignore-targets" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that when this expression is evaluated, any targets that the issuing Icon has should be ignored.

This is useful for &quot;skill&quot; and similar expression types that are not evaluated &quot;against&quot; a target, but might be rolled while the Icon is targeting someone.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="low-to-succeed" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a low result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="true" name="high-to-succeed" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that the success or failure of this expression should be determined by a high result.

This is generally used in conjunction with a &quot;target-value&quot; in game systems that support this notion.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="discard-remainder" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be discarded.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="remainder-round-down" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result down to the next lowest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" default="false" name="remainder-roiund-up" type="xs:boolean">
                                              <xs:annotation>
                                                <xs:documentation>Flag indicating that if the result of this expression does not evaluate to a whole number, the remainder should be used to round the result up to the next highest whole number.

Game system vary their rules for how/when/if remainders are allowed and how those remainders are treated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="hit-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="miss-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-hit-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical hit.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-miss-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when it is determined that this expression results in a &quot;critical miss.&quot;

This value is only relavent when the expression's type is &quot;attack.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="damage-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;damage.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="spell-sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a sound file to be played when this expression is evaluated.

This value is only relavent when the expression's type is &quot;spell.&quot;
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="applied-effect" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a pre-defined Icon Effect to apply to the targeted Icon when this expression is evaluated.

Pre-defined Icon Effects are set up by the Master and maintained by him.  In order to be applied, the value of this tag must match exactly the description of a pre-defined Icon Effect.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="hand" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>Reference to where &quot;hand&quot; information about the expression can be retrieved.

This information is used by the program when rendering various aspects of an expression to pass information on to the user.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="1" name="armed" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a field that indicates whether this item is considered to be &quot;armed&quot; (ie, ready for use).

A state of &quot;armed&quot; does not really impact the behavior of the program, unless the Master has set the Preferences option that forces an expression to be &quot;armed&quot; before it will be evaluated.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="desc-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A descriptive labe for this expression.  This is only used for &quot;old style&quot; expression menus.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="target-value" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The &quot;target&quot; that the expression should be evaluated against.

For game systems that support this notion, this value contributes to the program determining whether the result of the expression evaluates to success or failure.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="pre-roll" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression to be inserted before the main portion of the expression is built.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="post-roll" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression to be inserted after the main portion of the expression is built.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="pre-expr" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression that is inserted immediately prior to the main expression.

Where &quot;pre-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="post-expr" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A piece of the expression that is inserted immediately after the main expression.

Where &quot;post-roll&quot; is intended to be generally used to issue descriptive chat text concerning the expression, this tag is used to alter eactly what the expression contains.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="die-to-use" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a previously defined die to be used as the main payload of this expression.

For &quot;custom,&quot; &quot;spell&quot; and &quot;button&quot; expression types, it is assumed that no predefined die will be used, so this tag is generally ignored.  For other expression types, however, this makes up the bulk of the expression's payload.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="static-label" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A label that is used in the &quot;old style&quot; of Dice Dialogs and menus.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-check" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value to be used to determine a &quot;critical hit.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="critical-miss-check" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value to be used to determine a &quot;critical miss.&quot;

Generally this value should point to another field, where the user will enter data pertinent to this evaluation.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="sound" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A sound file to play when this expression is evaluated.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="effect" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A visual effect to render when this expression is evaluated.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="exclude-above" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="exclude-below" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="reroll-above" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be re-rolled.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="reroll-above-save" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates in excess of, will be discarded, but the number of discardings is retained.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="reroll-below-save" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression (or a piece of the expression) evaluates lower than, will be discarded, but the number of discardings is retained.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="success-above" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression evaluates in excess of, will indicate success.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="success-below" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>A value which, if the expression evaluates lower than, will indicate success.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="no-damage" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a field that indicates to the program that this expression should never be considered to adjust hit points.

This is useful for expressions of the &quot;spell&quot; variety that may or may not adjust hit points.  By indicating to the program where it can look for a hint, it is better able to determine whether or not to adjust hit points.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="quantity" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The ID of a field where the program can look for quantity information.

The notion of &quot;quantity&quot; applies to an expression that, with a single evaluation, may disberse its results amongst various targets.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="check-availability">
                                              <xs:annotation>
                                                <xs:documentation>This clause instructs the program where to look to determine if the expression is available for evaluation.

If not present, then an expression is always considered to be available.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="0" name="memorized" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; may be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="check-against" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field, in the same row as the &quot;compare-to&quot; field, whose value will be used to compare against.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                                    <xs:annotation>
                                                      <xs:documentation>Flag that indicates whether availability fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="modify-on-roll">
                                              <xs:annotation>
                                                <xs:documentation>This clause instructs the program where to look to determine what fields should have their contents modified when this expression is evaluated.</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="0" name="memorized" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find information about the number of this expression that is available.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field where the program can find the &quot;cost&quot; of evaluating this expression.  This &quot;cost&quot; will be deducted from the value contained in the &quot;memorized&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="cost-value" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>A literal value for &quot;cost&quot; that is always used instead of a value contained in the character sheet data.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-from" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field where the program can find comparison information.

For availablity that does not rely on a particular number of the expression being &quot;memorized,&quot; this value refers to a &quot;pool&quot; of resources from which multiple expressions can draw.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="compare-to" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of a field which contains data that must match data contained in the &quot;compare-from&quot; field.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" name="modify-field" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The ID of the field to be modified.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" default="false" name="can-cast-up" type="xs:boolean">
                                                    <xs:annotation>
                                                      <xs:documentation>Flag that indicates whether modification fails if there are no matching data available.

Essentially, this covers the instance where the user can elect to use a slot where he has data available in exchange for a slot where he does not.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="1" name="actionable-def">
                                              <xs:annotation>
                                                <xs:documentation>This clause allows you to give the program a hint regarding which piece of multi-part expression should be used for hit point adjustment.

Primarily intended for expressions of the &quot;spell&quot; type, this clause is prone to failure.  The problem arises from the fact that a &quot;spell&quot; type can contain any number of expression pieces, any one of which (or none of which) may actually cause a hit point adjustment.

The &quot;no-damage&quot; tag is a refinement of this situation, but can not act alone.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="total-clauses" type="xs:integer">
                                                    <xs:annotation>
                                                      <xs:documentation>The total number of pieces that this expression is expected to contain.

If the expression does not actually contain this many pieces, then no hit point adjustment will be done.
</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="1" maxOccurs="1" name="use-clause" type="xs:integer">
                                                    <xs:annotation>
                                                      <xs:documentation>The piece of the expression that should be used for hit point adjustment.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="color" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The color to use when issuing the the chat message when this expression is evaluated.

This represents a &quot;default,&quot; which can be overridding by various other settings in the program.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="minimum" type="xs:integer">
                                              <xs:annotation>
                                                <xs:documentation>A minimum possible value for this expression.  If the expression is evaluated and the results is below this minimum, then the minimum value is used instead of the actual results.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="parse-script" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a script to be executed when this expression is evaluated.

If this script returns a result, that result will be used instead of anything that the expression would otherwise generate.
</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" name="post-script" type="xs:string">
                                              <xs:annotation>
                                                <xs:documentation>The name of a script to execute after this expression has been evaluated.</xs:documentation>
                                              </xs:annotation>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="parse-script-ex">
                                              <xs:annotation>
                                                <xs:documentation>A clause that defines a script to be executed during the &quot;parse&quot; phase of expression evaluation.

This differs from the &quot;parse-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                    <xs:annotation>
                                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                    </xs:annotation>

                                                    <xs:complexType>
                                                      <xs:sequence>
                                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                          <xs:annotation>
                                                            <xs:documentation>An individual script variable.</xs:documentation>
                                                          </xs:annotation>

                                                          <xs:complexType>
                                                            <xs:sequence>
                                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                            </xs:sequence>

                                                          </xs:complexType>

                                                        </xs:element>

                                                      </xs:sequence>

                                                    </xs:complexType>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="post-script-ex">
                                              <xs:annotation>
                                                <xs:documentation>A clause that defines a script to be executed after the expression is evaluated.

This differs from the &quot;post-script&quot; tag in that this extended clause allows you to define and pass variables to the script before it is executed.

This allows you to have more generic scripts whose functionality is tailored by data contained in the character sheet.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                    <xs:annotation>
                                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                    </xs:annotation>

                                                    <xs:complexType>
                                                      <xs:sequence>
                                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                          <xs:annotation>
                                                            <xs:documentation>An individual script variable.</xs:documentation>
                                                          </xs:annotation>

                                                          <xs:complexType>
                                                            <xs:sequence>
                                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                            </xs:sequence>

                                                          </xs:complexType>

                                                        </xs:element>

                                                      </xs:sequence>

                                                    </xs:complexType>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                            <xs:element minOccurs="0" maxOccurs="unbounded" name="static-label-script-ex">
                                              <xs:annotation>
                                                <xs:documentation>A clause that defines a script to be executed to build an expression's label.

Unlike &quot;parse&quot; scripts, the script referenced by this tag must contain a &quot;getLabel()&quot; method that returns a String.  This string will be used, unaltered, in the program's interface to represent the expression.
</xs:documentation>
                                              </xs:annotation>

                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element minOccurs="1" maxOccurs="1" name="script" type="xs:string">
                                                    <xs:annotation>
                                                      <xs:documentation>The script file name to execute.</xs:documentation>
                                                    </xs:annotation>

                                                  </xs:element>

                                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="args">
                                                    <xs:annotation>
                                                      <xs:documentation>List of arguments to define for the script.</xs:documentation>
                                                    </xs:annotation>

                                                    <xs:complexType>
                                                      <xs:sequence>
                                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="arg">
                                                          <xs:annotation>
                                                            <xs:documentation>An individual script variable.</xs:documentation>
                                                          </xs:annotation>

                                                          <xs:complexType>
                                                            <xs:sequence>
                                                              <xs:element minOccurs="1" name="name" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The name of the variable to be declared in the script's context.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                              <xs:element minOccurs="1" name="value" type="xs:string">
                                                                <xs:annotation>
                                                                  <xs:documentation>The value of the declared varible.</xs:documentation>
                                                                </xs:annotation>

                                                              </xs:element>

                                                            </xs:sequence>

                                                          </xs:complexType>

                                                        </xs:element>

                                                      </xs:sequence>

                                                    </xs:complexType>

                                                  </xs:element>

                                                </xs:sequence>

                                              </xs:complexType>

                                            </xs:element>

                                          </xs:choice>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                    <xs:element minOccurs="0" maxOccurs="1" name="dot-field">
                                      <xs:annotation>
                                        <xs:documentation>A special interface component that renders as a series of &quot;dots&quot; that can be either selected or unselected.

This is intended for game systems that support this special way of tracking data.
</xs:documentation>
                                      </xs:annotation>

                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element minOccurs="0" name="minimum" type="xs:integer">
                                            <xs:annotation>
                                              <xs:documentation>The minimum number of &quot;dots&quot; that can be selected.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                          <xs:element minOccurs="0" name="maximum" type="xs:integer">
                                            <xs:annotation>
                                              <xs:documentation>The maximum number of &quot;dots&quot; to render.</xs:documentation>
                                            </xs:annotation>

                                          </xs:element>

                                        </xs:sequence>

                                      </xs:complexType>

                                    </xs:element>

                                  </xs:choice>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                          </xs:choice>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" name="spell-setup">
                      <xs:annotation>
                        <xs:documentation>This is a special interface element that places a button on the tab that accesses &quot;spell&quot; setup.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:element minOccurs="0" name="label" type="xs:string">
                            <xs:annotation>
                              <xs:documentation>The label to be placed in the button that is rendered on the tab.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" name="spell-level-source">
                            <xs:annotation>
                              <xs:documentation>This clause defines for the program where to look for spell level information.

In order to operate correctly, &quot;spell-setup&quot; must have a variety of information, including where to find spell level names, where the maximum number of spells of that level can be found and what the current number of spells of that level are found.
</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" name="table-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the table that contains spell level information.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="name-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the name of the spell level is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="max-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the maximum number of spells of this level is stored.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="cur-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the current number of spells of this level is stored.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                          <xs:element minOccurs="0" name="spell-source">
                            <xs:annotation>
                              <xs:documentation>The ID of the table that contains the actual spell information.</xs:documentation>
                            </xs:annotation>

                            <xs:complexType>
                              <xs:sequence>
                                <xs:element minOccurs="0" name="table-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the table where spells are located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="name-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the name of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="desc-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the description/expression of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="level-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the level of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="cost-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the cost (how many spell slots the spell requires) of the spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                                <xs:element minOccurs="0" name="mem-id" type="xs:string">
                                  <xs:annotation>
                                    <xs:documentation>The ID of the field within the &quot;table-id&quot; table where the number currently &quot;memorized&quot; of this spell is located.</xs:documentation>
                                  </xs:annotation>

                                </xs:element>

                              </xs:sequence>

                            </xs:complexType>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this button should only be rendered if the program is running in Master mode.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                          <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                            <xs:annotation>
                              <xs:documentation>Flag indicating that this button should never be rendered.</xs:documentation>
                            </xs:annotation>

                          </xs:element>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                    <xs:element minOccurs="0" maxOccurs="unbounded" name="box-panel">
                      <xs:annotation>
                        <xs:documentation>This clause creates a special table for game systems that require such things.</xs:documentation>
                      </xs:annotation>

                      <xs:complexType>
                        <xs:sequence>
                          <xs:choice minOccurs="1" maxOccurs="unbounded">
                            <xs:element minOccurs="0" name="tag" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A unique identifier for saving this table's contents.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="name" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>A label to associate with this table.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" name="id" type="xs:string">
                              <xs:annotation>
                                <xs:documentation>An optional identifier so that the contents of this table can be referenced elsewhere in the definition.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this field should only appear to the Master.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
                              <xs:annotation>
                                <xs:documentation>Flag indicating that this field should never be rendered.</xs:documentation>
                              </xs:annotation>

                            </xs:element>

                            <xs:element minOccurs="0" maxOccurs="unbounded" name="row-labels">
                              <xs:annotation>
                                <xs:documentation>List of labels to associate with each row in the table.</xs:documentation>
                              </xs:annotation>

                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element minOccurs="0" maxOccurs="unbounded" name="row-label" type="xs:string">
                                    <xs:annotation>
                                      <xs:documentation>The label of each row.</xs:documentation>
                                    </xs:annotation>

                                  </xs:element>

                                </xs:sequence>

                              </xs:complexType>

                            </xs:element>

                          </xs:choice>

                        </xs:sequence>

                      </xs:complexType>

                    </xs:element>

                  </xs:choice>

                </xs:sequence>

              </xs:complexType>

            </xs:element>

            <xs:element minOccurs="0" name="name" type="xs:string">
              <xs:annotation>
                <xs:documentation>The label to use in this 's page's tab.  This is exclusive to the &quot;tab-name&quot; tag.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon-n" type="xs:string">
              <xs:annotation>
                <xs:documentation>The &quot;normal&quot; icon to render for this tab.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon-h" type="xs:string">
              <xs:annotation>
                <xs:documentation>The &quot;hover&quot; (when the mouse pointer is over the area of the tab) icon to render for this tab.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon-s" type="xs:string">
              <xs:annotation>
                <xs:documentation>The &quot;selected&quot; icon to render for this tab when it is selected (the currently displayed tab).</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-name" type="xs:string">
              <xs:annotation>
                <xs:documentation>The label to use in this 's page's tab.  This is exclusive to the &quot;name&quot; tag.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon" type="xs:string">
              <xs:annotation>
                <xs:documentation>The name of an icon to use for this tab.  This tag is exclusive of the &quot;tab-icon-X&quot; tags.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="background" type="xs:string">
              <xs:annotation>
                <xs:documentation>The name of an image file to use as a rendered texture for this page's background.

Note that this is a path name relative to where the program is installed.  For Players to see this texture, they must have the image installed in the exact same relative location as the Master.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-tooltip" type="xs:string">
              <xs:annotation>
                <xs:documentation>A string to use for this page's tooltip.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" default="false" name="dm-only" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that this page should only be visible to the Master.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" default="false" name="hidden" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>Flag indicating that this page should never be rendered.</xs:documentation>
              </xs:annotation>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element minOccurs="0" maxOccurs="unbounded" name="note">
        <xs:annotation>
          <xs:documentation>A special note page (tab) on the character sheet.  You can define multiple note pages, but it is recommended that you only have one (since each note page can contain an unlimited number of sub-pages).</xs:documentation>
        </xs:annotation>

        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="name" type="xs:string">
              <xs:annotation>
                <xs:documentation>The label to use in this note's tab.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon-n" type="xs:string">
              <xs:annotation>
                <xs:documentation>The &quot;normal&quot; icon to render for this tab.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon-h" type="xs:string">
              <xs:annotation>
                <xs:documentation>The &quot;hover&quot; (when the mouse pointer is over the area of the tab) icon to render for this tab.</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon-s" type="xs:string">
              <xs:annotation>
                <xs:documentation>The &quot;selected&quot; icon to render for this tab when it is selected (the currently displayed tab).</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tag" type="xs:string">
              <xs:annotation>
                <xs:documentation>The unique string that will identify data associated with this note.

Without a tag, any data entered here will not be saved with the character sheet.
</xs:documentation>
              </xs:annotation>

            </xs:element>

            <xs:element minOccurs="0" name="tab-icon" type="xs:string">
              <xs:annotation>
                <xs:documentation>The name of an icon to use for this tab.  This tag is exclusive of the &quot;tab-icon-X&quot; tags.</xs:documentation>
              </xs:annotation>

            </xs:element>

          </xs:sequence>

        </xs:complexType>

      </xs:element>

    </xs:sequence>

  </xs:complexType>

</xs:element>
Child Elements
Name Type Min Occurs Max Occurs
Derivation Tree
[No Sub Types]
character-sheet-definition
    [No Super Types]
Generated using Liquid XML Studio by Liquid Technologies Ltd