File:  [LON-CAPA] / modules / damieng / clean_xml / loncapa.xsd
Revision 1.19: download - view: text, annotated - select for diffs
Thu Jan 5 16:55:16 2017 UTC (7 years, 10 months ago) by damieng
Branches: MAIN
CVS tags: HEAD
schema update

<?xml version="1.0" encoding="UTF-8"?>
<!--
  This schema was created for LON-CAPA.
  Element documentation often comes from the Mozilla Developer Network.
  MDN wiki documents are created by Mozilla Contributors and licensed under CC-BY-SA 2.5.
  Links:
      https://developer.mozilla.org/en-US/docs/Web/HTML/Element
      https://developer.mozilla.org/en-US/docs/MDN/About$history
      http://creativecommons.org/licenses/by-sa/2.5/
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
  <xs:annotation>
    <xs:documentation>
      XML schema for LON-CAPA documents.
    </xs:documentation>
  </xs:annotation>
  
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
    <xs:annotation>
      <xs:documentation>
        This import is needed to use xml:space="preserve".
      </xs:documentation>
    </xs:annotation>
  </xs:import>
  
  <xs:annotation>
    <xs:documentation>
      Shared simple types.
    </xs:documentation>
  </xs:annotation>
  <xs:simpleType name="perl">
    <xs:restriction base="xs:string">
      <xs:pattern value="\s*-?(($|&amp;)([#|$]*[A-Za-z][\w_]*|\{[A-Za-z][\w_]*\}))([\[\{].+[\]\}])*(\([^$&amp;\)]+\))*\s*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="int-or-perl">
    <xs:union memberTypes="xs:int perl"/>
  </xs:simpleType>
  <xs:simpleType name="non-negative-int-or-perl">
    <xs:union memberTypes="xs:nonNegativeInteger perl"/>
  </xs:simpleType>
  <xs:simpleType name="decimal-or-perl">
    <xs:union memberTypes="xs:decimal perl"/>
  </xs:simpleType>
  <xs:simpleType name="real">
    <xs:restriction base="xs:string">
      <xs:pattern value="[+-]?\d*\.?\d*([eE][+-]?\d+)?"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="real-or-perl">
    <xs:union memberTypes="real perl"/>
  </xs:simpleType>
  <xs:simpleType name="yesno">
    <xs:restriction base="xs:string">
      <xs:enumeration value="yes"/>
      <xs:enumeration value="no"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="yesno-or-perl">
    <xs:union memberTypes="yesno perl"/>
  </xs:simpleType>
  <xs:simpleType name="onoff">
    <xs:restriction base="xs:string">
      <xs:enumeration value="on"/>
      <xs:enumeration value="off"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="onoff-or-perl">
    <xs:union memberTypes="onoff perl"/>
  </xs:simpleType>
  <xs:simpleType name="color">
    <xs:restriction base="xs:string">
      <xs:pattern value="[x#][\da-fA-F]{6}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="color-or-perl">
    <xs:union memberTypes="color perl"/>
  </xs:simpleType>
  <xs:simpleType name="location">
    <xs:restriction base="xs:string">
      <xs:enumeration value="random"/>
      <xs:enumeration value="top"/>
      <xs:enumeration value="bottom"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="location-or-perl">
    <xs:union memberTypes="location perl"/>
  </xs:simpleType>
  
  <xs:annotation>
    <xs:documentation>
      Shared attributes
    </xs:documentation>
  </xs:annotation>
  <xs:attribute default="normalsize" name="TeXsize">
    <xs:annotation>
      <xs:documentation>
        Size of LaTeX fonts used in printing.
        
        Possible values of TeXsize attribute:
        - tiny: smallest
        - scriptsize: very small
        - footnotesize: smaller
        - small: small
        - normalsize: normal
        - large: large
        - Large: larger
        - LARGE: even larger
        - huge: still larger
        - Huge: largest
        
        Note, that all parameters coincide with standard LaTeX commands for changing font size though you do not escape them.
      </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
      <xs:union memberTypes="perl">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="tiny"/>
            <xs:enumeration value="scriptsize"/>
            <xs:enumeration value="footnotesize"/>
            <xs:enumeration value="small"/>
            <xs:enumeration value="normalsize"/>
            <xs:enumeration value="large"/>
            <xs:enumeration value="Large"/>
            <xs:enumeration value="LARGE"/>
            <xs:enumeration value="huge"/>
            <xs:enumeration value="Huge"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:union>
    </xs:simpleType>
  </xs:attribute>
  
  <xs:annotation>
    <xs:documentation>
      Problem (root element)
    </xs:documentation>
  </xs:annotation>
  <xs:element name="problem">
    <xs:annotation>
      <xs:documentation>
        Root for .problem documents.
        
        This must be first in the file. It sets up the header of the webpage and generates the submit buttons. It also handles due dates properly.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="head"/>
        <xs:group ref="text-with-parts"/>
        <xs:group ref="inserts"/>
        <xs:element ref="allow"/>
        <xs:element ref="meta"/>
        <xs:element ref="parameter"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Library (root element)
    </xs:documentation>
  </xs:annotation>
  <xs:element name="library">
    <xs:annotation>
      <xs:documentation>
        Root for .library documents.
        A LON-CAPA .library file can contain just a script block, or just response items, or both.
        Library content is loaded into a problem statement by using an &lt;import&gt; element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-with-responses"/>
        <xs:group ref="inserts"/>
        <xs:element ref="part"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Groups of block and inline elements.
    </xs:documentation>
  </xs:annotation>
  <xs:group name="text-with-parts">
    <xs:annotation>
      <xs:documentation>
        List of block and inline elements mixed with text. These elements can contain parts and responses.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element ref="part"/>
      <xs:group ref="responses"/>
      <xs:group ref="blocks-with-parts"/>
      <xs:group ref="inlines"/>
    </xs:choice>
  </xs:group>
  <xs:group name="text-with-responses">
    <xs:annotation>
      <xs:documentation>
        List of block and inline elements mixed with text. These elements can contain responses but not parts.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:group ref="responses"/>
      <xs:group ref="blocks-with-responses"/>
      <xs:group ref="inlines"/>
    </xs:choice>
  </xs:group>
  <xs:group name="text-only">
    <xs:annotation>
      <xs:documentation>
        List of block and inline elements mixed with text. These elements cannot contain responses or parts.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:group ref="blocks-with-text"/>
      <xs:group ref="inlines"/>
    </xs:choice>
  </xs:group>
  <xs:group name="universal-blocks">
    <xs:annotation>
      <xs:documentation>
        Blocks with a content that does not depend on the scope, and that can appear anywhere with text and blocks.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element ref="randomlabel"/>
      <xs:element ref="import"/>
      <xs:element ref="while"/>
      <xs:element ref="tex"/>
      <xs:element ref="print"/>
      <xs:element ref="web"/>
      <xs:element ref="standalone"/>
      <xs:element ref="script"/>
      <xs:element ref="languageblock"/>
      <xs:element ref="window"/>
      <xs:element ref="windowlink"/>
      <xs:element ref="togglebox"/>
      <xs:element ref="instructorcomment"/>
      <xs:element ref="comment"/>
      <xs:element ref="gnuplot"/>
      <xs:element ref="organicstructure"/>
      <xs:element ref="drawimage"/>
      <xs:element ref="solved"/>
      <xs:element ref="notsolved"/>
      
      <xs:group ref="heading"/>
      <xs:element ref="noscript"/>
      <xs:element ref="header"/>
      <xs:element ref="footer"/>
      <xs:element ref="aside"/>
      <xs:element ref="pre"/>
      <xs:element ref="hr"/>
      <xs:element ref="address"/>
      <xs:element ref="blockquote"/>
      <xs:element ref="figure"/>
      <xs:element ref="object"/>
      <xs:element ref="applet"/>
      <xs:element ref="embed"/>
      <xs:element ref="video"/>
      <xs:element ref="audio"/>
      <xs:element ref="map"/>
      <xs:element ref="canvas"/>
      <xs:element ref="form"/>
      <xs:element ref="fieldset"/>
      <xs:element ref="iframe"/>
    </xs:choice>
  </xs:group>
  <xs:group name="blocks-with-parts">
    <xs:choice>
      <xs:group ref="universal-blocks"/>
      
      <xs:element name="block" type="block-with-parts"/>
      <xs:element name="problemtype" type="problemtype-with-parts"/>
      <xs:element name="randomlist" type="randomlist-with-parts"/>
      
      <xs:element name="section" type="section-with-parts"/>
      <xs:element name="div" type="div-with-parts"/>
      <xs:element name="p" type="p-with-responses"/>
      <xs:element name="ul" type="ul-with-parts"/>
      <xs:element name="ol" type="ol-with-parts"/>
      <xs:element name="dl" type="dl-with-parts"/>
      <xs:element name="table" type="table-with-parts"/>
    </xs:choice>
  </xs:group>
  <xs:group name="blocks-with-responses">
    <xs:choice>
      <xs:group ref="universal-blocks"/>
      
      <xs:element name="block" type="block-with-responses"/>
      <xs:element name="problemtype" type="problemtype-with-responses"/>
      <xs:element name="randomlist" type="randomlist-with-responses"/>
      
      <xs:element name="section" type="section-with-responses"/>
      <xs:element name="div" type="div-with-responses"/>
      <xs:element name="p" type="p-with-responses"/>
      <xs:element name="ul" type="ul-with-responses"/>
      <xs:element name="ol" type="ol-with-responses"/>
      <xs:element name="dl" type="dl-with-responses"/>
      <xs:element name="table" type="table-with-responses"/>
    </xs:choice>
  </xs:group>
  <xs:group name="blocks-with-text">
    <xs:choice>
      <xs:group ref="universal-blocks"/>
      
      <xs:element name="block" type="block-with-text"/>
      <xs:element name="problemtype" type="problemtype-with-text"/>
      <xs:element name="randomlist" type="randomlist-with-text"/>
      
      <xs:element name="section" type="section-with-text"/>
      <xs:element name="div" type="div-with-text"/>
      <xs:element name="p" type="p-with-text"/>
      <xs:element name="ul" type="ul-with-text"/>
      <xs:element name="ol" type="ol-with-text"/>
      <xs:element name="dl" type="dl-with-text"/>
      <xs:element name="table" type="table-with-text"/>
    </xs:choice>
  </xs:group>
  <xs:group name="inlines">
    <xs:choice>
      <xs:element ref="display"/>
      <xs:element ref="m"/>
      <xs:element ref="lm"/>
      <xs:element ref="chem"/>
      <xs:element ref="num"/>
      <xs:element ref="parse"/>
      <xs:element ref="algebra"/>
      <xs:element ref="textline"/>
      <xs:element ref="displayweight"/>
      <xs:element ref="displaystudentphoto"/>
      <xs:element ref="translated"/>
      
      <xs:element ref="span"/>
      <xs:element ref="a"/>
      <xs:element ref="strong"/>
      <xs:element ref="em"/>
      <xs:element ref="b"/>
      <xs:element ref="i"/>
      <xs:element ref="sup"/>
      <xs:element ref="sub"/>
      <xs:element ref="code"/>
      <xs:element ref="kbd"/>
      <xs:element ref="samp"/>
      <xs:element ref="cite"/>
      <xs:element ref="q"/>
      <xs:element ref="tt"/>
      <xs:element ref="ins"/>
      <xs:element ref="del"/>
      <xs:element ref="var"/>
      <xs:element ref="small"/>
      <xs:element ref="big"/>
      <xs:element ref="br"/>
      <xs:element ref="img"/>
      <xs:element ref="input"/>
      <xs:element ref="select"/>
      <xs:element ref="textarea"/>
      <xs:element ref="label"/>
      <xs:element ref="button"/>
    </xs:choice>
  </xs:group>
  <xs:group name="inserts">
    <xs:annotation>
      <xs:documentation>
        List of elements that insert something if a condition is verified.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element ref="displaytitle"/>
      <xs:element ref="displayduedate"/>
      <xs:element ref="preduedate"/>
      <xs:element ref="postanswerdate"/>
    </xs:choice>
  </xs:group>
  
  <xs:annotation>
    <xs:documentation>
      List of responses
    </xs:documentation>
  </xs:annotation>
  <xs:group name="responses">
    <xs:choice>
      <xs:group ref="inlineResponses"/>
      <xs:group ref="blockResponses"/>
    </xs:choice>
  </xs:group>
  <xs:group name="inlineResponses">
    <xs:choice>
      <xs:element ref="stringresponse"/>
      <xs:element ref="optionresponse"/>
      <xs:element ref="numericalresponse"/>
      <xs:element ref="formularesponse"/>
      <xs:element ref="mathresponse"/>
      <xs:element ref="organicresponse"/>
      <xs:element ref="reactionresponse"/>
      <xs:element ref="customresponse"/>
      <xs:element ref="externalresponse"/>
    </xs:choice>
  </xs:group>
  <xs:group name="blockResponses">
    <xs:choice>
      <xs:element ref="essayresponse"/>
      <xs:element ref="radiobuttonresponse"/>
      <xs:element ref="matchresponse"/>
      <xs:element ref="rankresponse"/>
      <xs:element ref="imageresponse"/>
      <xs:element ref="functionplotresponse"/>
      <xs:element ref="dataresponse"/>
    </xs:choice>
  </xs:group>
  <xs:attributeGroup name="response-identification">
    <xs:attribute name="id" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Unique identifier for the response in the document. If this isn’t set, it will be set during the publication step. It is used to assign parameter names in a way that can be tracked if an instructor modifies by hand.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="name" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          If set, the name will be used by the resource assembly tool when one is modifying parameters.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  
  <xs:annotation>
    <xs:documentation>
      String response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="stringresponse">
    <xs:annotation>
      <xs:documentation>
        Query for a string.
        An internal textline element is necessary for the student’s response to go in. It can check the string for either case or order.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="stringhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="answer" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            the correct answer, either a perl list or scalar
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="cs" name="type">
        <xs:annotation>
          <xs:documentation>
            Specifies how the string is checked (like the CAPA styles). Possible values are:
            – cs: case sensitive, order important.
            – ci: case insensitive, order important.
            – mc: case insensitive, order unimportant.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="cs"/>
                <xs:enumeration value="ci"/>
                <xs:enumeration value="mc"/>
                <xs:enumeration value="re"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="answerdisplay" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            String to display for answer
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="preprocess" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Pre-Processor Subroutine
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Essay response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="essayresponse">
    <xs:annotation>
      <xs:documentation>
        Query for a long text or a line, possibly with spell checking.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element ref="textfield"/>
        <xs:element ref="hiddensubmission"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="stringhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Radio button response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="radiobuttonresponse">
    <xs:annotation>
      <xs:documentation>
        Query for a single choice among several statements.
        The value of the foils can only be true, false, or unused.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="foilgroup" type="radiobuttonresponse--foilgroup"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="radiobuttonhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="max" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Max Number Of Shown Foils
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="yes" name="randomize" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            Randomize Foil Order
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="vertical" name="direction">
        <xs:annotation>
          <xs:documentation>
            Display Direction
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="vertical"/>
                <xs:enumeration value="horizontal"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="radiobuttonresponse--foilgroup">
    <xs:annotation>
      <xs:documentation>Collection of Foils</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="conceptgroup" type="radiobuttonresponse--conceptgroup"/>
      <xs:element name="foil" type="radiobuttonresponse--foil"/>
      <xs:element ref="comment"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="radiobuttonresponse--conceptgroup">
    <xs:annotation>
      <xs:documentation>
        Collection of similar foils.
        When a problem is displayed, only one of the contained foils is selected for display.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="foil" type="radiobuttonresponse--foil"/>
    </xs:choice>
    <xs:attribute name="concept" type="xs:string" use="required"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="radiobuttonresponse--foil">
    <xs:annotation>
      <xs:documentation>
        Statement next to the radio button.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="text-only"/>
      <xs:element ref="parserlib"/>
      <xs:element ref="scriptlib"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="value" use="required">
      <xs:annotation>
        <xs:documentation>
          Correct Option (true, false, or unused).
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="true"/>
              <xs:enumeration value="false"/>
              <xs:enumeration value="unused"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="random" name="location" type="location-or-perl"/>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Option response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="optionresponse">
    <xs:annotation>
      <xs:documentation>
        Query for a choice for each given statement.
        
        Option Response problems present foils to the student with drop-down boxes. The student can select the matching choice for the foils from a list of choices. Optionally, the foils may be bundled into Concept Groups and the system will select one foil from each group to display to the student.
        
        By default, the list of options is presented in front of the foils. Using the optional drawoptionlist element, the list of options can be embedded into the foil. 
        
        The foilgroup is required to have an options attribute which should be a perl list of possible options for the student.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="foilgroup" type="optionresponse--foilgroup"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="optionhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="max" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Max Number Of Shown Foils
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="yes" name="randomize" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            Randomize Foil Order
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="horizontal" name="TeXlayout">
        <xs:annotation>
          <xs:documentation>
            Display of options when printed
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="horizontal"/>
                <xs:enumeration value="vertical"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="optionresponse--foilgroup">
    <xs:annotation>
      <xs:documentation>Collection of Foils</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="conceptgroup" type="optionresponse--conceptgroup"/>
      <xs:element name="foil" type="optionresponse--foil"/>
      <xs:element ref="comment"/>
    </xs:choice>
    <xs:attribute name="options" use="required">
      <xs:annotation>
        <xs:documentation>
          Perl list of possible foil values.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:pattern value="@[a-zA-Z0-9_\-]+"/>
            </xs:restriction>
          </xs:simpleType>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:pattern value="\(.+\)"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="texoptions">
      <xs:annotation>
        <xs:documentation>
          Set to "nochoice" to avoid the display of the list of option values when printing.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="nochoice"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="checkboxvalue" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          When there are only 2 option values, set this attribute to one of them in order to display checkboxes. A foil checkbox will have to be checked when the foil has the chosen option value.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="checkboxoptions">
      <xs:annotation>
        <xs:documentation>
          Set to "nochoice" to avoid the display of the list of option values.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="nochoice"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="noprompt">
      <xs:annotation>
        <xs:documentation>
          Set to "nochoice" to omit "Select all that are ... ".
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="nochoice"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="mincheck" type="xs:int">
      <xs:annotation>
        <xs:documentation>
          Minimum boxes required to check.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="maxcheck" type="xs:int">
      <xs:annotation>
        <xs:documentation>
          Maximum boxes permitted to check.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="optionresponse--conceptgroup">
    <xs:annotation>
      <xs:documentation>
        Collection of similar foils.
        When a problem is displayed, only one of the contained foils is selected for display.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="foil" type="optionresponse--foil"/>
    </xs:choice>
    <xs:attribute name="concept" type="xs:string" use="required"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="optionresponse--foil">
    <xs:annotation>
      <xs:documentation>
        Statement next to the drop-down box.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="text-only"/>
      <xs:element ref="parserlib"/>
      <xs:element ref="scriptlib"/>
      <xs:element name="drawoptionlist" type="optionresponse--drawoptionlist"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="value" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Correct Option
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="random" name="location" type="location-or-perl"/>
  </xs:complexType>
  <xs:complexType name="optionresponse--drawoptionlist">
    <xs:annotation>
      <xs:documentation>
        Draw Option List
        
        By default, the list of options is presented in front of the foils. Using the optional &lt;drawoptionlist&gt; element, the list of options can be embedded into a foil.
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Match response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="matchresponse">
    <xs:annotation>
      <xs:documentation>
        Query for matches betweens items from two lists.
        It is also possible to query for matches with optionresponse, but optionresponse only accepts simple text for the matches. With matchresponse, it is possible to use anything as a match, such as equations, images, plots, or long styled texts.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="foilgroup" type="matchresponse--foilgroup"/>
        <xs:element ref="hintgroup"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="max" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Max Number Of Shown Foils
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="yes" name="randomize" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            Randomize Foil Order
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="matchresponse--itemgroup">
    <xs:annotation>
      <xs:documentation>Items to Match</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="item" type="matchresponse--item"/>
    </xs:choice>
    <xs:attribute default="yes" name="randomize" type="yesno-or-perl">
      <xs:annotation>
        <xs:documentation>
          Randomize Order
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="top" name="location">
      <xs:annotation>
        <xs:documentation>
          Items Display Location
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="top"/>
              <xs:enumeration value="bottom"/>
              <xs:enumeration value="left"/>
              <xs:enumeration value="right"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="vertical" name="direction">
      <xs:annotation>
        <xs:documentation>
          Items Display Direction
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="vertical"/>
              <xs:enumeration value="horizontal"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="columns">
      <xs:annotation>
        <xs:documentation>
          Items Columns
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:int">
              <xs:enumeration value="1"/>
              <xs:enumeration value="2"/>
              <xs:enumeration value="3"/>
              <xs:enumeration value="4"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="TeXitemgroupwidth">
      <xs:annotation>
        <xs:documentation>
          TeXitemgroupwidth attribute allows you to specify the width of table with items for matching. The value of this attribute defines the width in percents with respect to text line width.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\d+%"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="matchresponse--item">
    <xs:annotation>
      <xs:documentation>Item</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="text-only"/>
      <xs:element ref="parserlib"/>
      <xs:element ref="scriptlib"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute default="random" name="location" type="location-or-perl"/>
  </xs:complexType>
  <xs:complexType name="matchresponse--foilgroup">
    <xs:annotation>
      <xs:documentation>Collection of Foils</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="itemgroup" type="matchresponse--itemgroup"/>
      <xs:element name="conceptgroup" type="matchresponse--conceptgroup"/>
      <xs:element name="foil" type="matchresponse--foil"/>
      <xs:element ref="comment"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="matchresponse--conceptgroup">
    <xs:annotation>
      <xs:documentation>
        Collection of similar foils.
        When a problem is displayed, only one of the contained foils is selected for display.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="foil" type="matchresponse--foil"/>
    </xs:choice>
    <xs:attribute name="concept" type="xs:string" use="required"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="matchresponse--foil">
    <xs:annotation>
      <xs:documentation>Foil</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="text-only"/>
      <xs:element ref="parserlib"/>
      <xs:element ref="scriptlib"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="value" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Correct Option
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="random" name="location" type="location-or-perl"/>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Rank response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="rankresponse">
    <xs:annotation>
      <xs:documentation>
        Query to sort a list of items in the right order.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="foilgroup" type="rankresponse--foilgroup"/>
        <xs:element ref="hintgroup"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="max" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Max Number Of Shown Foils
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="yes" name="randomize" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            Randomize Foil Order
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="rankresponse--foilgroup">
    <xs:annotation>
      <xs:documentation>Collection of Foils</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="conceptgroup" type="rankresponse--conceptgroup"/>
      <xs:element name="foil" type="rankresponse--foil"/>
      <xs:element ref="comment"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="rankresponse--conceptgroup">
    <xs:annotation>
      <xs:documentation>
        Collection of similar foils.
        When a problem is displayed, only one of the contained foils is selected for display.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="foil" type="rankresponse--foil"/>
    </xs:choice>
    <xs:attribute name="concept" type="xs:string" use="required"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="rankresponse--foil">
    <xs:annotation>
      <xs:documentation>Foil</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="text-only"/>
      <xs:element ref="parserlib"/>
      <xs:element ref="scriptlib"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="value" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Rank Value
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="random" name="location" type="location-or-perl"/>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Image response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="imageresponse">
    <xs:annotation>
      <xs:documentation>
        Query for positions on images.
        
        Each foil must contain a reference to an image, at least one rectangle or polygon specifying the correct region, and a text describing what should be selected. Students have to click on the foil image, and their answer is correct if they clicked inside the correct region.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="foilgroup" type="imageresponse--foilgroup"/>
        <xs:element ref="hintgroup"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="max" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Max Number Of Shown Foils
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="imageresponse--foilgroup">
    <xs:annotation>
      <xs:documentation>Collection of Imageresponse foils</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="conceptgroup" type="imageresponse--conceptgroup"/>
      <xs:element name="foil" type="imageresponse--foil"/>
      <xs:element ref="comment"/>
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="imageresponse--conceptgroup">
    <xs:annotation>
      <xs:documentation>
        Collection of similar foils.
        When a problem is displayed, only one of the contained foils is selected for display.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="foil" type="imageresponse--foil"/>
    </xs:choice>
    <xs:attribute name="concept" type="xs:string" use="required"/>
  </xs:complexType>
  <xs:complexType name="imageresponse--foil">
    <xs:annotation>
      <xs:documentation>Image response foil. image and rectangle are required.</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:element name="image" type="imageresponse--image"/>
      <xs:element name="polygon" type="imageresponse--polygon"/>
      <xs:element name="rectangle" type="imageresponse--rectangle"/>
      <xs:element name="text" type="imageresponse--text"/>
    </xs:choice>
    <xs:attribute name="name" type="xs:string" use="required"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="imageresponse--image">
    <xs:annotation>
      <xs:documentation>
        Imageresponse Image (contains the image source file).
        
        The delimited text should correspond to a published image resource.
        Example: &lt;image&gt;/res/adm/includes/templates/man1.jpg&lt;/image&gt;. The following image formats are recommended - gif, jpg or png. Other formats may work, but there may be printing or display issues. The image should only appear once per foil.
      </xs:documentation>
    </xs:annotation>
    <xs:choice minOccurs="0">
      <xs:element ref="gnuplot"/>
    </xs:choice>
  </xs:complexType>
  <xs:simpleType name="imageresponse--rectangle">
    <xs:annotation>
      <xs:documentation>
        Rectangular area in image (contains coordinate pairs).
        
        The delimited text specifies a rectangular area that is correct, specified as (x1,y1)-(x2,y2), where x1, x2, y1, and y2 are number corresponding to the x and y coordinates of two corners that define a rectangle which specifies where the right answer for this foil is located on the image. For example, (0,0)-(100,200) will specify that a rectangle 100 pixels wide and 200 pixels tall, situated in the upper left of the image, is correct. At least one rectangle is required; multiple rectangles may be specified.
      </xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="perl">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\s*\(.+\)-\(.+\)\s*"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:simpleType name="imageresponse--polygon">
    <xs:annotation>
      <xs:documentation>Polygonal area in image (contains coordinate list)</xs:documentation>
    </xs:annotation>
    <xs:union memberTypes="perl">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="\s*\(.+\)(-\(.+\))+\s*"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>
  <xs:complexType mixed="true" name="imageresponse--text">
    <xs:annotation>
      <xs:documentation>
        Text to describe option
        
        The delimited text is printed before the image is shown on the screen.
        This text is typically used to describe to the student what they are expected to click on.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="text-only"/>
      <xs:element ref="parserlib"/>
      <xs:element ref="scriptlib"/>
    </xs:choice>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Numerical response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="numericalresponse">
    <xs:annotation>
      <xs:documentation>
        Query for one or several numbers, possibly with units.
        
        A tolerance parameter should be used to determine how closely the system will require the student’s answer to be in order to count it correct. The tolerance will default to zero if it is not defined. The tolerance parameter should always be defined for a numerical problem unless you are certain only integer answers are generated from your script and you want students to reply with exactly that integer.
        
        A significant figures parameter tells the system how many significant figures there are in the problem, as either a single number, e.g. 3, or a range of acceptable values, expressed as min,max. The system will check to make sure that the student’s answer contains this many significant digits, useful in many scientific calculations.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="answergroup" type="caparesponse--answergroup"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="numericalhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="answer" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The answer the system is looking for. The answer can use variables calculated/defined in the problem’s script block, allowing the answer to be determined dynamically (including randomization).
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="incorrect" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Incorrect Answers
            When switched into exam ("bubble sheet") mode, LON-CAPA usually create wrong answers automatically. To specify wrong answers yourself, you need to provide an array of incorrect values in this attribute. You need to provide at least as many incorrects as 1 less than the number of bubbles on the exam. You can provide more if you want to.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="unit" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Expected units for the answer. For instance, "m/s^2" or "km/(A*hr)".
            LON-CAPA will automatically perform some conversions between units of the same dimension when units are provided for a problem. You can provide an answer of "1.45 km" for a distance. If the computer expects the answer in cm, it will convert your answer before comparing against the numerical solution.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="format" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            You can format the number displayed by the computer as the answer. For instance, if the answer is one-third, the computer will display that it computed ".333333333" as the answer. If you'd like to shorten that, you can use the Format field. Format strings like "2E" (without the quotes) will display three significant digits in scientific notation. Format strings like "2f" will display two digits after the decimal point. Format strings like "2s" will round a number to 2 significant digits.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="preprocess" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Pre-Processor Subroutine
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="caparesponse--answergroup">
    <xs:annotation>
      <xs:documentation>
        Collection of Answers.
        This element can be used instead of the answer attribute on the response element when several answers are correct, or when the correct answer has several components.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="answer" type="caparesponse--answer"/>
    </xs:choice>
    <xs:attribute default="ordered" name="type">
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="ordered"/>
              <xs:enumeration value="unordered"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="caparesponse--answer">
    <xs:annotation>
      <xs:documentation>
        A correct list of values or vectors.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:element name="vector" type="caparesponse--vector">
        <xs:annotation>
          <xs:documentation>
            A vector, part of a correct answer.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="value" type="caparesponse--value">
        <xs:annotation>
          <xs:documentation>
            A value, part of a correct answer.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:choice>
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute default="ordered" name="type">
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="ordered"/>
              <xs:enumeration value="unordered"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:simpleType name="caparesponse--value">
    <xs:annotation>
      <xs:documentation>Value</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="caparesponse--vector">
    <xs:annotation>
      <xs:documentation>Vector</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:annotation>
    <xs:documentation>
      Formula response (using caparesponse--answergroup like numericalresponse).
    </xs:documentation>
  </xs:annotation>
  <xs:element name="formularesponse">
    <xs:annotation>
      <xs:documentation>
        Formula Response asks the student to type in a formula as an answer.
        
        If the answer is 2x² + 4, the student is allowed to type “2*x*x+4”, “x*x + x*x + 4”, “2*xˆ2 + 14 - 10”, or any other equivalent expression.
        Formula Response problems have many of the same characteristics of Numerical Response problems, including the ability to run scripts, dynamically generate answers, etc.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="answergroup" type="caparesponse--answergroup"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="formulahint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="answer" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The correct answer. It can use variables calculated/defined in the problem’s Perl script block, allowing the answer to be determined dynamically.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="samples" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Sample Points.
            
            Format:
            1. A comma-separated list of the variables you wish to interpret,
            2. followed by “@” (not in quotes),
            3. followed by any number of the following two things, separated by semi-colons:
            (a) a comma-separated list of as many numbers as there are variables, which specifies one sampling point, OR
            (b) a comma-separated list of as many numbers as there are variables, followed by a colon, followed by another list of as many numbers as there are variables, followed by a #, followed by an integer.
            
            a) specifies one point to sample. b) specifies a range for each variable, and the system will take as many random samples from that range as the number after the #.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="preprocess" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Pre-Processor Subroutine
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Math response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="mathresponse">
    <xs:annotation>
      <xs:documentation>
        Query for text that is evaluated with a script written in a Computer Algebra System (CAS) language.
        The CAS script must be included in the response with an &lt;answer&gt; element.
        
        MathResponse is extremely powerful, as it tests answers for conditions rather than agreement with a particular correct answer. An unfortunate byproduct, however, is that it cannot be analyzed by several of the LON-CAPA statistics tools.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="answer" type="mathresponse--answer">
          <xs:annotation>
            <xs:documentation>
              Maxima or R script using the arrays RESPONSE (the student response) and LONCAPALIST (from the args attribute).
              Returns a boolean in the last statement that will be true if the answer is correct.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="textfield"/>
        <xs:element ref="hiddensubmission"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="mathhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="answerdisplay" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            This attribute contains what is displayed when the problem is in "Show Answer" mode.
            You will want to use it so that the students can see the correct answer after the "Show Answer Date" configured when the problem is assigned in the course space.
            
            This is usually the name of a Perl string variable (starting with '$') created in a Perl script before the response.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="cas" use="required">
        <xs:annotation>
          <xs:documentation>
            Algebra System. Maxima and R are supported.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="maxima"/>
                <xs:enumeration value="R"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="args" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Perl array that will be passed to the CAS script as the LONCAPALIST variable.
            This is usually the name of a Perl array variable (starting with '@') created in a Perl script before the response.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="libraries" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Comma-separated list of libraries.
            
            The following libraries can be used with Maxima:
            absimp, affine, atensor, atrig1, augmented_lagrangian,
            contrib_ode, ctensor, descriptive, diag, eigen, facexp, fft,
            fourie, functs, ggf, grobner, impdiff, ineq, interpol,
            itensor, lapack, lbfgs, lindstedt, linearalgebra, lsquares,
            makeOrders, mnewton, mchrpl, ntrig, orthopoly,
            quadpack, rducon, romberg, scifac, simplex, solve_rec,
            sqdnst, stats, sterling, sym, units, vect, zeilberger
            
            The following libraries can be used with R:
            alr3, boot, car, class, cluster, datasets, Hmisc,
            KernSmooth, leaps, lmtest, MASS, methods, mgcv,
            nlme, nnet, qAnalyst, quadprog, rpart, SuppDists,
            spatial, splines, stats, stats4, survival, tseries, zoo
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType mixed="true" name="mathresponse--answer">
    <xs:attribute name="type" type="xs:string"/>
    <xs:attribute fixed="preserve" ref="xml:space"/>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Function plot response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="functionplotresponse">
    <xs:annotation>
      <xs:documentation>
        Query for the drawing of a function.
        
        Requires that the student creates a plot that matches specified criteria.
        Examples can be functions that have certain slopes, curvature, maxima or minima at specified independent coordinate values. The students create their answer by dragging the curves and adjusting the slopes.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="functionplotelements"/>
        <xs:element ref="functionplotruleset"/>
        <xs:element ref="hintgroup"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="width" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Width (pixels)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="height" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Height (pixels)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="xlabel" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Label x-axis
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="-10" name="xmin" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Minimum x-value
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="10" name="xmax" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Maximum x-value
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="yes" name="xaxisvisible" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            x-axis visible
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="ylabel" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Label y-axis
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="-10" name="ymin" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Minimum y-value
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="10" name="ymax" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Maximum y-value
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="yes" name="yaxisvisible" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            y-axis visible
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="yes" name="gridvisible" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            This determines whether or not the grid is on the graph.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answerdisplay" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Background plot(s) for answer (function(x):xmin:xmax,function(x):xmin:xmax,x1:y1:sx1:sy1:x2:y2:sx2:sy2,...)
            
            This is a green curve the computer will display once the correct answer has been submitted. It is static, and can be given as a piecewise function.
            Since some problems will have multiple correct answers, this necessarily will only be a possible answer. Only the left hand side of the equation is necessary. For example, entering x + 2 will display the line y = x + 2.
            The syntax must be syntax recognized by GeoGebra. To test syntax for Geogebra directly, visit http://www.geogebra.org/webstart/geogebra.html .
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="functionplotelements">
    <xs:annotation>
      <xs:documentation>Function Plot Elements</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="spline"/>
        <xs:element ref="backgroundplot"/>
        <xs:element ref="plotobject"/>
        <xs:element ref="plotvector"/>
        <xs:element ref="drawvectorsum"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="spline">
    <xs:annotation>
      <xs:documentation>
        At least one spline is necessary for a graph problem. These splines are what will be adjusted and analyzed to solve the problem.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="index">
        <xs:annotation>
          <xs:documentation>
            This is the label assigned to the spline. In general, it's simplest just to label them A, B, C etc.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[a-zA-Z_]+"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="order">
        <xs:annotation>
          <xs:documentation>
            This determines the number of Control Points on the spline. For example, selecting '3' means there will be 3 points on the spline that can be moved, as well as 3 points off the spline that will control the slope. 
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:int">
                <xs:minInclusive value="2"/>
                <xs:maxInclusive value="8"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="initx" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Initial x-value
            "Initial x-value" and "Initial y-value" determine where the left most Control Point will be.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="inity" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Initial y-value
            "Initial x-value" and "Initial y-value" determine where the left most Control Point will be.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="scalex" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            This determines the right most location of the Control Points (on the spline). To figure out where this point will be, add 'Initial x-value' to 'Scale x'.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="scaley" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            This determines the distance (in the y-direction) between the Control Points on the spline, and the ones that control the slope.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="backgroundplot">
    <xs:annotation>
      <xs:documentation>
        Background Function Plot.
        This places a static curve on the graph of your choosing. It can be labeled, moveable or fixed, and any color desired. Only the right hand side of the function you want displayed is necessary. For example, entering x+2 will display the line y=x+2. The syntax must be syntax recognized by GeoGebra.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="function" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            An equals sign is not necessary. Just give the right hand side of the function. LON-CAPA variables are usable as well to allow individualized problems for each student. The syntax must be syntax recognized by GeoGebra.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="xinitial" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Initial x-value (optional)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="xfinal" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Final x-value (optional)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="label" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Label on Plot
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="color">
        <xs:annotation>
          <xs:documentation>
            Color of the background function (hex code).
            The default is 000000 (black). It is recommended to choose a color other than green, since it is easily confused with being the answer.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[\da-fA-F]{6}"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="yes" name="fixed" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            Fixed location
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="plotobject">
    <xs:annotation>
      <xs:documentation>
        This places a point in the applet. Generally intended to be used with Vectors to create problems involving Free-Body Diagrams or any other points that vectors (or arrows) connect to and from.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="label" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Label on Plot
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="x" type="real-or-perl"/>
      <xs:attribute name="y" type="real-or-perl"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="plotvector">
    <xs:annotation>
      <xs:documentation>
        This creates a vector (or arrow) in the applet. Generally intended to be used with Objects to create problems involving Free-Body Diagrams or to establish connections between Objects.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="label" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Label on Plot.
            Determines the name of the vector, as well as the name that will be visible in the problem.
            This value MUST be capitalized and cannot include spaces or most symbols. To be safe, stick with letters and numbers.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="tailx" type="real-or-perl"/>
      <xs:attribute name="taily" type="real-or-perl"/>
      <xs:attribute name="tipx" type="real-or-perl"/>
      <xs:attribute name="tipy" type="real-or-perl"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="drawvectorsum">
    <xs:annotation>
      <xs:documentation>Draw Vector Sum</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="label" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Label on Plot
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="tailx" type="real-or-perl"/>
      <xs:attribute name="taily" type="real-or-perl"/>
      <xs:attribute default="yes" name="showvalue" type="yesno-or-perl"/>
      <xs:attribute name="vectorlist" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="functionplotruleset">
    <xs:annotation>
      <xs:documentation>
        This is where the rules are defined. These rules will determine whether or not an entered answer is correct or not. If there are no rules, any answer will be deemed correct. If there is more than one rule, when an answer is submitted, the server will analyze them in order until one of them is broken (of course, if it's a correct answer, it will go through all of them and return a green box). In such an event, any subsequent rules will be ignored. If conditional hints related to these rules are added, only the first broken rule's hint will be shown, even if all rules are broken.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="functionplotrule"/>
        <xs:element ref="functionplotvectorrule"/>
        <xs:element ref="functionplotvectorsumrule"/>
        <xs:element ref="functionplotcustomrule"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="functionplotrule">
    <xs:annotation>
      <xs:documentation>
        Function Plot Graph Rule.
        
        Used to create a rule that determines whether or not a submitted graph is correct. In general, it takes the form of testing the function, its integral, or its first or second derivative over a given set of x-values. The test can be to see if it equals, is greater than, or less than a specified value. Anywhere a number is needed, a variable can also be used.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="index" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            This is an internal label for the rule. Something must be entered here, and it must be different for each rule. This same value will be used to add a conditional hint.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="0" name="derivativeorder">
        <xs:annotation>
          <xs:documentation>
            This determines what the server will be testing. For instance, choose 'First derivative' causes the server to evaluate the derivative of the entered answer over the given domain.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:int">
                <xs:enumeration value="0"/>
                <xs:enumeration value="1"/>
                <xs:enumeration value="2"/>
                <xs:enumeration value="-1"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="xinitial" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Initial x-value.
            A value must be entered for one of "Initial x-value" and "Initial x-value label". Either choose a numerical value for x (the first option), or choose the beginning of the submitted answer, the end, or a previously chosen named point.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="xinitiallabel">
        <xs:annotation>
          <xs:documentation>
            Initial x-value label.
            A value must be entered for one of "Initial x-value" and "Initial x-value label". Either choose a numerical value for x (the first option), or choose the beginning of the submitted answer, the end, or a previously chosen named point.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[a-zA-Z_]+"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="xfinal" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Final x-value (optional).
            This determines the end of the domain over which the rule examines. To test only a single point (the initial value), leave "Final x-value" and "Final x-value label" blank. If a label is entered, such as 'positive', the point at which the rule fails will be given this special label. This label can then be used in subsequent rules as an 'Initial x-value label'.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="xfinallabel">
        <xs:annotation>
          <xs:documentation>
            Final x-value label (optional).
            This determines the end of the domain over which the rule examines. To test only a single point (the initial value), leave "Final x-value" and "Final x-value label" blank. If a label is entered, such as 'positive', the point at which the rule fails will be given this special label. This label can then be used in subsequent rules as an 'Initial x-value label'.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[a-zA-Z_]+"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="minimumlength" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Minimum length for range (optional).
            This tests that the difference between the initial and final x-values are at least a certain length apart. This is only useful if there is at least one label.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="maximumlength" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Maximum length for range (optional).
            This tests that the difference between the initial and final x-values are at most a certain length apart. This is only useful if there is at least one label.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="eq" name="relationship">
        <xs:annotation>
          <xs:documentation>
            The heart of the rule. This choice determines whether the chosen 'function' is greater than, less than, equal to, etc. a certain 'value'.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="eq"/>
                <xs:enumeration value="ne"/>
                <xs:enumeration value="ge"/>
                <xs:enumeration value="gt"/>
                <xs:enumeration value="lt"/>
                <xs:enumeration value="le"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="undef" name="value" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Enter the number you wish to compare to. It is also possible to choose 'not defined', in the event the answer should not have a value for the given domain. Within the value argument, the function itself can be evaluated using &amp;fpr_f(), its derivative using &amp;fpr_dfdx(), and its second derivative using &amp;fpr_d2fdx2(). This allows for a comparison of two points on the graph. The value of a previously defined label can be retrieved using the function &amp;fpr_val(), e.g., &amp;fpr_val('positive'). Previous defined values from script blocks can also be retrieved as normal variables, e.g., $x.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="percenterror" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            This allows for a margin of error in the y-direction. For instance, if the rule requires that the derivative be equal to 5, the server will accept values close enough to 5 that are within the percent error defined here. Note: Choosing 10% would not mean that the answer is correct as long as it is within the range 4.5-5.5. Instead, the percent corresponds to the total size of the graph. For the function itself, the 'percent error' is multiplied by the ymax-ymin; for the first derivative, it's multiplied by (ymax-ymin)/(xmax-xmin); for the second derivative, it's multiplied by (ymax-ymin)/(xmax-xmin)2; and for the integral, it's multiplied by (ymax-ymin)*(xmax-xmin).
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="functionplotvectorrule">
    <xs:annotation>
      <xs:documentation>
        Function Plot Vector Rule
        Used to test whether vectors are in the right place, pointed in the right direction, and have the correct length.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="index" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Index/Name
            This is an internal label for the rule. This attribute must be different for each rule. This same value will be used to add a conditional hint.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="vector" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The name of one of the vectors in the list of function plot elements. Specifically, the one you want to test.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="attachpoint" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Attached to object.
            Object(s) this vector should be attached to. For more than one object, separate them by commas. If the vector should not be attached to any object, leave this blank. In this case, an object is considered attached if its tail OR its tip is in the vicinity of the object.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="notattachpoint" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Not attached to object.
            Object(s) that this vector should be not be near.
            For more than one object, separate them by commas. Particularly useful for distractor vectors.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="tailpoint" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Tail attached to object.
            Tail(s) this vector should be attached to.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="tippoint" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Tip attached to object.
            Tip(s) this vector should be attached to.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="nottailpoint" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Tail not attached to object.
            Tail(s) this vector should not be attached to.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="nottippoint" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Tip not attached to object.
            Tip(s) this vector should not be attached to.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="length" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            How long the vector should be.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="lengtherror" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Absolute error length.
            How accurate the length must be to get the answer correct.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="angle" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            What direction should the vector point. All values are measured in degrees, counterclockwise starting at the positive x-axis. Values must be 0 ≤ θ &lt; 360.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="angleerror" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Absolute error angle.
            How accurate the angle must be to get the answer correct.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="functionplotvectorsumrule">
    <xs:annotation>
      <xs:documentation>
        Function Plot Vector Sum Rule
        Used to test the sum of a set of vectors.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="index" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Index/Name.
            This is an internal label for the rule. It must be different for each rule. This same value will be used to add a conditional hint.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="vectors" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Comma-separated list of vectors.
            List all of the vectors that should be added up to be tested.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="length" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Sum vector length.
            How long the sum of these vectors should be.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="lengtherror" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Absolute error length.
            How accurate the length must be to get the answer correct.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="angle" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Sum vector angle.
            What direction should the sum of these vectors point. All values are measured in degrees, counterclockwise starting at the positive x-axis. Values must be 0 ≤ θ &lt; 360.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="angleerror" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Absolute error angle.
            How accurate the angle must be to get the answer correct.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="functionplotcustomrule">
    <xs:annotation>
      <xs:documentation>
        Used to create rules that aren't options using the other rules. The coding is done in Perl and follows Perl syntax. Any variable written inside this rule will be recognized as normal and any evaluation function can be used as well.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element name="answer">
          <xs:annotation>
            <xs:documentation>
              Answer algorithm, normally in Perl
            </xs:documentation>
          </xs:annotation>
          <xs:complexType mixed="true">
            <xs:attribute default="loncapa/perl" name="type" type="xs:string"/>
            <xs:attribute fixed="preserve" ref="xml:space"/>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:attribute name="index" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Index/Name
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Organic response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="organicresponse">
    <xs:annotation>
      <xs:documentation>
        Query for an organic chemical structure with a molecular editor.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="organichint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute default="autoez" name="options">
        <xs:annotation>
          <xs:documentation>
            Comma-separated list of options:
            
            - autoez: Auto E,Z stereochemistry
            - multipart: Multipart Structures
            - nostereo: No stereochemistry
            - reaction: Is a reaction
            - number: Able to number atoms
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="(autoez|multipart|nostereo|reaction|number)(\s*,\s*(autoez|multipart|nostereo|reaction|number))*"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="molecule" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Starting Molecule.
            Syntax: JME.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answer" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Correct Answer.
            Syntax: SMILES (Simplified Molecular Input Line Entry System).
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="jmeanswer" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            JME string of the answer
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="width" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Width of correct answer image
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Reaction response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="reactionresponse">
    <xs:annotation>
      <xs:documentation>
        Query for a chemical reaction.
        An internal textline element is necessary for the student's response to go in.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="reactionhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="answer" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            The correct answer.
            Chemical reactions use the following syntax:
            - Reactants are separated from products by '-&gt;'.
            - Individual reactants and products are separated by ' +' (leading space is obligatory).
            - Numbers preceding the first symbol of a chemical specie are considered to be stoichiometric coefficients.
            - Numbers appearing after the first symbol of a chemical specie are considered to be subscripts.
            - Superscripts are initialized by '^' and terminated by a space.
            - Ionic charges are superscripts composed of a number followed by a sign (i.e. '^2+').
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="initial" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Initial reaction displayed to students. See the answer attribute for the syntax.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Custom response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="customresponse">
    <xs:annotation>
      <xs:documentation>
        Query for text without any constraint (any character is allowed). A script analyzes the answer to grade it automatically.
        The use of this response type is generally discouraged, since the responses will not be analyzable by the LON-CAPA statistics tools.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="answer" type="customresponse--answer"/>
        <xs:element ref="textfield"/>
        <xs:element ref="hiddensubmission"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:element ref="customhint"/>
        <xs:element ref="hintpart"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="answerdisplay" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            String to display for answer
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType mixed="true" name="customresponse--answer">
    <xs:annotation>
      <xs:documentation>
        Perl script evaluating the student answer.
        
        For a single textfield, the student’s answer will be in a variable $submission. If the Custom Response has multiple textfields, the answers will be in an array reference, and can be accessed as $$submission[0], $$submission[1], etc.
        
        The script must return a standard LON-CAPA response. The most common LON-CAPA responses are:
        - EXACT ANS: return if solved exactly correctly
        - APPROX ANS: return if solved approximately
        - INCORRECT: return if not correct, uses up a try
        - ASSIGNED SCORE: partial credit (also return the credit factor, e.g. return(ASSIGNED SCORE,0.3);)
        - SIG FAIL, NO UNIT, EXTRA ANSWER, MISSING ANSWER, BAD FORMULA, WANTED NUMERIC, WRONG FORMAT: return if not correct for different reasons, does not use up a try
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="type" type="xs:string"/>
    <xs:attribute fixed="preserve" ref="xml:space"/>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      External response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="externalresponse">
    <xs:annotation>
      <xs:documentation>
        Query for a long text or a line, sent to an external program for grading.
        
        The form sent will consist of:
        - LONCAPA student response full text of what the student entered in the entry field
        - LONCAPA correct answer contents of the answer attribute
        - LONCAPA language specified language encoding of the requesting resource
        - all items in the form attribute if any of these clash with the above, the above values will overwite the value in the form attribute
        
        The response of the remote server needs to be in XML as follows:
        - loncapagrade: takes no attributes, but must surround the response.
        - awarddetail: required. The delimited text inside must be one of the detailed results that appears in the data storage documentation. CVS:loncapa/doc/homework/datastorage, look for resource.partid.responseid.awarddetail.
        - message: optional message to have shown to the student.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element ref="textfield"/>
        <xs:element ref="hiddensubmission"/>
        <xs:element ref="hiddenline"/>
        <xs:element ref="hintgroup"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="url" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            url to submit the answer form to. It does not need to be a LON-CAPA machine.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answer" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            data to post in the form element LONCAPA_correct_answer to the remote site.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="form" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            hash variable name that will be submitted to the remote site as a HTTP form.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answerdisplay" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Data response
    </xs:documentation>
  </xs:annotation>
  <xs:element name="dataresponse">
    <xs:annotation>
      <xs:documentation>
        Query for text or numbers.
        Advanced type of response that implements a simple data storage and needs an input element, such as textline, to work correctly.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="textfield"/>
        <xs:element ref="hiddensubmission"/>
        <xs:element ref="hiddenline"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="response-identification"/>
      <xs:attribute name="type" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            type of data stored in this response field. It should be one of the types supported by parameter.html
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="display" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            string that will be used to describe the field when interfacing with humans.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Shared response elements
    </xs:documentation>
  </xs:annotation>
  <xs:element name="responseparam">
    <xs:annotation>
      <xs:documentation>
        Parameters for a response
        
        Defines an externally adjustable parameter for the question, which the question can then use to allow other users to customize the problem for their courses without changing the source code of the problem.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute name="type" type="xs:string" use="required"/>
      <xs:attribute name="default" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            default value
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="description" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="textfield">
    <xs:annotation>
      <xs:documentation>
        Large Text Entry Area, contains the text that appears by default
        
        Creates a large text input box. If data appears between the start and end tags, the data will appear in the textfield if the student has not yet made a submission.
        Additionally, it takes two attributes: rows and cols, which control the height and width of the text area respectively.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="tex"/>
        <xs:element ref="web"/>
      </xs:choice>
      <xs:attribute default="10" name="rows" type="int-or-perl"/>
      <xs:attribute default="80" name="cols" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Columns
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="addchars" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Click-On Texts (comma sep)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="spellcheck">
        <xs:annotation>
          <xs:documentation>
            If this attribute is present, the text the user types is spellchecked when focus leaves the input field.
            The value specifies the language in which the spellcheck is performed.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="none"/>
                <xs:enumeration value="en"/>
                <xs:enumeration value="de"/>
                <xs:enumeration value="he"/>
                <xs:enumeration value="es"/>
                <xs:enumeration value="fr"/>
                <xs:enumeration value="pt"/>
                <xs:enumeration value="tr"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="textline">
    <xs:annotation>
      <xs:documentation>
        Single Line Text Entry Area. Displays a field to enter text for a response.
        Should only be used inside stringresponse, numericalresponse, formularesponse, mathresponse, organicresponse, reactionresponse and customresponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="id" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Id that will be part of the HTML input element id.
            This can be used to get a reference to the input element in Javascript.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="20" name="size" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            controls the width of the textline
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="addchars" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Comma-separated list of characters or words that can be inserted with a click.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="no" name="readonly" type="yesno-or-perl"/>
      <xs:attribute name="spellcheck">
        <xs:annotation>
          <xs:documentation>
            If this attribute is present, the text the user types is spellchecked when focus leaves the input field.
            The value specifies the language in which the spellcheck is performed.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="none"/>
                <xs:enumeration value="en"/>
                <xs:enumeration value="de"/>
                <xs:enumeration value="he"/>
                <xs:enumeration value="es"/>
                <xs:enumeration value="fr"/>
                <xs:enumeration value="pt"/>
                <xs:enumeration value="tr"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="hiddensubmission">
    <xs:annotation>
      <xs:documentation>
        This creates a hidden form field with the given value.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="value" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="hiddenline">
    <xs:annotation>
      <xs:documentation>
        This creates a hidden form field with the old response value.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Hints
    </xs:documentation>
  </xs:annotation>
  <xs:element name="hintgroup">
    <xs:annotation>
      <xs:documentation>
        This element can either contain a simple hint displayed when the submitted answer for the part is not correct, or a more complex structure to display different hints for different submitted answers.
        
        To display different hints based on the submitted answer, the hint group has to contain hint conditions (&lt;*hint&gt; elements) and conditional hints (&lt;hintpart&gt; elements).
        A hint condition defines the foil(s) and foil answer(s) required to trigger a hint, and has a name attribute to identify it.
        A conditional hint (&lt;hintpart&gt;) defines what will be displayed if a particular hint condition is met. It includes a reference to the hint condition in the "on" attribute.
        A default conditional hint can be defined by using on="default" in a &lt;hintpart&gt;. The contents of this hint will be displayed if none of the other conditional hints is triggered.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="hintpart"/>
        <xs:element ref="stringhint"/>
        <xs:element ref="radiobuttonhint"/>
        <xs:element ref="optionhint"/>
        <xs:element ref="numericalhint"/>
        <xs:element ref="formulahint"/>
        <xs:element ref="mathhint"/>
        <xs:element ref="organichint"/>
        <xs:element ref="reactionhint"/>
        <xs:element ref="customhint"/>
      </xs:choice>
      <xs:attribute default="no" name="showoncorrect" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            Show hint even if problem Correct
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="hintpart">
    <xs:annotation>
      <xs:documentation>
        Conditional Hint
        
        When a hint condition named the same as the on attribute evaluates to be correct, the contents of this element will be displayed.
        If no other hintpart is to show then all hintparts with an on value set to “default” will show.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
      <xs:attribute name="on" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="stringhint">
    <xs:annotation>
      <xs:documentation>
        String Hint Condition
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            Name of the hint condition.
            Should be set to the value of which hintpart will be shown.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answer" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            Text string.
            Should be set to the value of which hintpart will be shown.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="cs" name="type">
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="cs"/>
                <xs:enumeration value="ci"/>
                <xs:enumeration value="mc"/>
                <xs:enumeration value="re"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="preprocess" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Pre-Processor Subroutine
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="radiobuttonhint">
    <xs:annotation>
      <xs:documentation>
        Radiobutton Hint Condition
        
        The radiobutton hint element takes two attributes: answer and name. The name is the name of the hint condition, and the answer is an array. The first element of the array will be 'foil'; the remaining elements are the names of the foils that you require to have been checked by the student for the hint to be displayed. For example, if you create a radiobutton response problem with six foils named: granite, gabbro, gneiss, shale, sandstone and schist, and you want your hint named: igneous to be displayed when either granite or basalt had been checked your radiobutton hint would be as follows:
        
        &lt;radiobuttonhint answer="('foil','granite','gabbro')" name="igneous"&gt;&lt;/radiobuttonhint&gt;
        
        In order to trigger display of this hint you also need to create a hint condition (&lt;hintpart&gt;) that will include the text of the actual hint.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            should be set to the value of which hintpart will be shown
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answer">
        <xs:annotation>
          <xs:documentation>
            should be at least a two element list: first the type (foil or concept) and then either the foil name(s) or the concept string(s), e.g., “(’foil’,’greaterthan’,’equal’)” if the condition should be triggered by the foils named “greaterthan” or “equal”
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="\(\s*'.*'\s*\)"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="optionhint">
    <xs:annotation>
      <xs:documentation>
        Option Response Hint Condition
        
        There are two types of option response hint conditions: one for standalone foils and one for concept groups. In both cases the option hint element includes two parameters: answer and name for standalone foils, and concept and name for foils grouped together in a concept group.
        For the answer parameter, the names and submitted values for each of the foils that are being included in the hint condition are provided in a hash, i.e., in the format: ('Foil1'=&gt; 'True','Foil2'=&gt; 'False').
        In the case of a conditional hint for a concept group, the format of the concept parameter is also a hash that links the name of each concept group included in the hint condition to either 'correct' or 'incorrect' - e.g., &lt;optionhint concept="('buoyancy'=&gt; 'correct','density'=&gt; 'correct')" name="fluids" /&gt;.
        If 'correct' is specified for a named concept then when the conditional hint is evaluated answers for each of the foils selected by a student must be correct for the hint action to be triggered. If anything other than 'correct' is provided in the concept hash in the optionhint element then then students answers will be compared with the set answers for the foils in the concept group and as long as at least one answer is incorrect (i.e., the concept group was not correctly answered) then the corresponding hint action will be triggered.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            should be set to the value of which hintpart will be shown
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answer">
        <xs:annotation>
          <xs:documentation>
            Perl hash with foil names as keys and submitted values as values.
            Example: ('foil1'=&gt; 'true', 'foil2'=&gt; 'false')
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="\(\s*'.*'\s*\)"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="concept">
        <xs:annotation>
          <xs:documentation>
            Perl hash with concept names as keys and either 'correct' or 'incorrect' as values.
            Example: ('buoyancy'=&gt;'correct', 'density'=&gt; 'correct')
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="\(\s*'.*'\s*\)"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="numericalhint">
    <xs:annotation>
      <xs:documentation>
        Numerical Hint Condition
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            Unique name given to the hint condition.
            Should be set to the value of which hintpart will be shown.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answer" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Numerical answer for which the conditional is provided.
            Student submission of that answer in combination with the "unit" attribute in the hint condition will trigger the hint action specified in the &lt;hintpart&gt; element.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="unit" type="xs:string"/>
      <xs:attribute name="format" type="xs:string"/>
      <xs:attribute name="preprocess" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Pre-Processor Subroutine
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="formulahint">
    <xs:annotation>
      <xs:documentation>
        Formula Hint Condition
        
        The formula submitted by the student is evaluated at the sample points for the hint and the calculated values are compared with the corresponding values determined by evaluating the "hint" answer at the same sampling points. A close correspondence between the two sets of values will trigger the hint action specified in the &lt;hintpart&gt; element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            Unique name given to the hint condition.
            Should be set to the value of which hintpart will be shown.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="answer" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Formula answer for which the conditional is provided.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="samples" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Sample points (or range of points) over which sampling of the student’s submitted answer and the formula included in the formula hint answer parameter are to be compared. The syntax is the same as used to specify sampling points in the samples
            parameter of the formula reponse element itself.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="preprocess" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Pre-Processor Subroutine
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="mathhint">
    <xs:annotation>
      <xs:documentation>Math Hint Condition</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="answer" type="mathhint--answer"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute default="maxima" name="cas">
        <xs:annotation>
          <xs:documentation>
            Algebra System
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="maxima"/>
                <xs:enumeration value="R"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="args" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Argument Array
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="organichint">
    <xs:annotation>
      <xs:documentation>Organic Hint Condition</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute name="answer" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="reactionhint">
    <xs:annotation>
      <xs:documentation>Reaction Hint Condition</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute name="answer" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="customhint">
    <xs:annotation>
      <xs:documentation>
        Custom Hint Condition
        
        Define the hint condition within an answer element inside the customhint element. The condition is defined in the same way an answer is defined in customresponse, where you need to return EXACT_ANS to indicate when the customhint criteria are met.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="responseparam"/>
        <xs:element name="answer" type="customhint--answer"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            should be set to the value of which hintpart will be shown
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType mixed="true" name="customhint--answer">
    <xs:annotation>
      <xs:documentation>Hint algorithm</xs:documentation>
    </xs:annotation>
    <xs:attribute name="type" type="xs:string"/>
    <xs:attribute fixed="preserve" ref="xml:space"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="mathhint--answer">
    <xs:annotation>
      <xs:documentation>Hint algorithm</xs:documentation>
    </xs:annotation>
    <xs:attribute name="type" type="xs:string"/>
    <xs:attribute fixed="preserve" ref="xml:space"/>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Random label
    </xs:documentation>
  </xs:annotation>
  <xs:element name="randomlabel">
    <xs:annotation>
      <xs:documentation>
        Randomly labeled image
        
        This shows a specified image with images or text labels randomly assigned to a set of specific locations. Those locations may also have values assigned to them. A hash is generated that contains the mapping of labels to locations, labels to values, and locations to values.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element name="labelgroup" type="randomlabel--labelgroup">
          <xs:annotation>
            <xs:documentation>
              One is required, but multiple are allowed. This declares a group of locations and labels associated with them.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="bgimg">
          <xs:annotation>
            <xs:documentation>
              Element alternative to the bgimg attribute, which makes it possible to use a plot as a background image.
            </xs:documentation>
          </xs:annotation>
          <xs:complexType mixed="true">
            <xs:choice maxOccurs="unbounded" minOccurs="0">
              <xs:element ref="gnuplot"/>
            </xs:choice>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:attribute name="bgimg" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            Either a fully qualified URL for an external image or a LON-CAPA resource. It supports relative references (../images/apicture.gif). The image must either be a GIF or JPEG.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="width" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            The width of the image in pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="height" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            The height of the image in pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="texwidth" type="decimal-or-perl">
        <xs:annotation>
          <xs:documentation>
            The width of the image in millimeters.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="randomlabel--labelgroup">
    <xs:annotation>
      <xs:documentation>Group of Labels</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded">
      <xs:element name="label" type="randomlabel--label"/>
      <xs:element name="location" type="randomlabel--location">
        <xs:annotation>
          <xs:documentation>
            declares a location on the image that a label should appear at
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:choice>
    <xs:attribute name="name" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          This is the name of the group.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="text" name="type">
      <xs:annotation>
        <xs:documentation>
          the type of labels in this group
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="text"/>
              <xs:enumeration value="image"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="\normalsize" name="TeXsize">
      <xs:annotation>
        <xs:documentation>
          TeX font size
          Warning: as opposed to the TeXsize attribute in &lt;h1&gt;..&lt;h6&gt; &lt;font&gt; and &lt;basefont&gt;, this one requires a \ at the beginning of the values.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="\tiny"/>
              <xs:enumeration value="\scriptsize"/>
              <xs:enumeration value="\footnotesize"/>
              <xs:enumeration value="\small"/>
              <xs:enumeration value="\normalsize"/>
              <xs:enumeration value="\large"/>
              <xs:enumeration value="\Large"/>
              <xs:enumeration value="\LARGE"/>
              <xs:enumeration value="\huge"/>
              <xs:enumeration value="\Huge"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="randomlabel--label">
    <xs:annotation>
      <xs:documentation>Label Text or Path to image</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="text-only"/>
      <xs:element ref="preduedate"/>
      <xs:element ref="postanswerdate"/>
      <xs:element ref="parserlib"/>
      <xs:element ref="scriptlib"/>
    </xs:choice>
    <xs:attribute name="description" type="xs:string"/>
  </xs:complexType>
  <xs:complexType name="randomlabel--location">
    <xs:annotation>
      <xs:documentation>Label Location</xs:documentation>
    </xs:annotation>
    <xs:attribute name="x" type="int-or-perl" use="required"/>
    <xs:attribute name="y" type="int-or-perl" use="required"/>
    <xs:attribute name="value" type="xs:string"/>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Gnuplot
    </xs:documentation>
  </xs:annotation>
  <xs:element name="gnuplot">
    <xs:annotation>
      <xs:documentation>
        The gnuplot LON-CAPA element allows an author to design a plot which will be created programatically at the time when it is requested for display by a student. This is intended for use in homework problems where a distinct plot should be rendered for each student. It can be used in conjunction with a script to generate curve data for random plots.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="gnuplot-children"/>
      </xs:choice>
      <xs:attribute default="dynamically generated plot" name="alttag" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Brief description of the plot.
            This text is used as the alt value of the img element used to display the plot on a web page.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="300" name="height" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Height of image (pixels)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="400" name="width" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Width of image (pixels)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="xffffff" name="bgcolor" type="color-or-perl">
        <xs:annotation>
          <xs:documentation>
            Background color of image
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="x000000" name="fgcolor" type="color-or-perl">
        <xs:annotation>
          <xs:documentation>
            Foreground color of image
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="off" name="transparent" type="onoff-or-perl">
        <xs:annotation>
          <xs:documentation>
            Transparent image. If the image is transparent the background color will be ignored.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="on" name="grid" type="onoff-or-perl">
        <xs:annotation>
          <xs:documentation>
            Display grid
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="off" name="gridlayer" type="onoff-or-perl">
        <xs:annotation>
          <xs:documentation>
            Display grid front layer over filled boxes or filled curves
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="on" name="border" type="onoff-or-perl">
        <xs:annotation>
          <xs:documentation>
            Draw border around plot
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="9" name="font">
        <xs:annotation>
          <xs:documentation>
            Font size to use in web output (in pts, or "small", "medium" or "large").
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:int">
                <xs:minInclusive value="5"/>
                <xs:maxInclusive value="15"/>
              </xs:restriction>
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="small"/>
                <xs:enumeration value="medium"/>
                <xs:enumeration value="large"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="sans-serif" name="fontface">
        <xs:annotation>
          <xs:documentation>
            Type of font to use
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="sans-serif"/>
                <xs:enumeration value="serif"/>
                <xs:enumeration value="classic"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="100" name="samples">
        <xs:annotation>
          <xs:documentation>
            Number of samples for non-data plots.
            If a function element is used to specify the curve, this indicates the number of sample points to use.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:int">
                <xs:minInclusive value="100"/>
                <xs:maxInclusive value="5000"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="middle" name="align">
        <xs:annotation>
          <xs:documentation>
            Alignment for image in HTML
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="left"/>
                <xs:enumeration value="right"/>
                <xs:enumeration value="middle"/>
                <xs:enumeration value="center"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="93" name="texwidth" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Width of plot when printed (mm)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="22" name="texfont">
        <xs:annotation>
          <xs:documentation>
            Font size to use in TeX output (pts)
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:int">
                <xs:minInclusive value="8"/>
                <xs:maxInclusive value="36"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="monochrome" name="plotcolor">
        <xs:annotation>
          <xs:documentation>
            Color setting for printing
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="monochrome"/>
                <xs:enumeration value="color"/>
                <xs:enumeration value="colour"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="Cartesian" name="plottype">
        <xs:annotation>
          <xs:documentation>
            Plot type
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Cartesian"/>
                <xs:enumeration value="Polar"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="Cartesian" name="gridtype">
        <xs:annotation>
          <xs:documentation>
            Grid type
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Cartesian"/>
                <xs:enumeration value="Polar"/>
                <xs:enumeration value="Linear-Log"/>
                <xs:enumeration value="Log-Linear"/>
                <xs:enumeration value="Log-Log"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="default" name="lmargin">
        <xs:annotation>
          <xs:documentation>
            Left margin width (pts)
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl xs:int">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="default"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="default" name="rmargin">
        <xs:annotation>
          <xs:documentation>
            Right margin width (pts)
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl xs:int">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="default"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="default" name="tmargin">
        <xs:annotation>
          <xs:documentation>
            Top margin width (pts)
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl xs:int">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="default"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="default" name="bmargin">
        <xs:annotation>
          <xs:documentation>
            Bottom margin width (pts)
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl xs:int">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="default"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="1" name="major_ticscale" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Size of major tic marks (plot coordinates)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="0.5" name="minor_ticscale" type="real-or-perl">
        <xs:annotation>
          <xs:documentation>
            Size of minor tic mark (plot coordinates)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="noborder" name="box_border">
        <xs:annotation>
          <xs:documentation>
            Draw border for boxes
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="border"/>
                <xs:enumeration value="noborder"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="boxwidth" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Width of boxes, default is auto
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="empty" name="fillstyle">
        <xs:annotation>
          <xs:documentation>
            Fill style for boxes
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="empty"/>
                <xs:enumeration value="solid"/>
                <xs:enumeration value="pattern"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="0" name="solid" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Density of fill style for boxes
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="pattern">
        <xs:annotation>
          <xs:documentation>
            Pattern value for boxes
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:int">
                <xs:minInclusive value="0"/>
                <xs:maxInclusive value="6"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:group name="gnuplot-children">
    <xs:annotation>
      <xs:documentation>
        List of children, used in gnuplot and lonplot--block
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="title" type="lonplot--title"/>
      <xs:element name="axis" type="lonplot--axis">
        <xs:annotation>
          <xs:documentation>
            The Plot Axes element allows you to specify the domain and range of the data to display. It is closely tied with the Plot Ticks elements, which specify where the gridlines are drawn on the plot.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="curve" type="lonplot--curve">
        <xs:annotation>
          <xs:documentation>
            The curve element is where you set the data to be plotted by gnuplot.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="key" type="lonplot--key">
        <xs:annotation>
          <xs:documentation>
            The key element causes a key to be drawn on the plot when it is generated. The key will contain an entry for each curve which has a name.
            The key is the color of the foreground of the plot, specified in the gnuplot element.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="label" type="lonplot--label">
        <xs:annotation>
          <xs:documentation>
            The label element allows the author to place text at any position on the plot. There may be many label elements on one plot and all the labels which fall within the plot will show. The color used will be to foreground color of the plot and the font will be the size specified for the plot, both of which are set in the gnuplot element.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="xtics" type="lonplot--xtics"/>
      <xs:element name="ytics" type="lonplot--ytics"/>
      <xs:element name="xlabel" type="lonplot--xlabel"/>
      <xs:element name="ylabel" type="lonplot--ylabel"/>
      <xs:element name="block" type="lonplot--block"/>
    </xs:choice>
  </xs:group>
  <xs:simpleType name="lonplot--title">
    <xs:annotation>
      <xs:documentation>Plot Title</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:complexType name="lonplot--axis">
    <xs:annotation>
      <xs:documentation>Plot axes</xs:documentation>
    </xs:annotation>
    <xs:attribute default="x000000" name="color" type="color-or-perl">
      <xs:annotation>
        <xs:documentation>
          Color of grid lines
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="-10.0" name="xmin" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          Minimum x-value shown in plot
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="10.0" name="xmax" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          Maximum x-value shown in plot
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="-10.0" name="ymin" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          Minimum y-value shown in plot
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="10.0" name="ymax" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          Maximum y-value shown in plot
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="on" name="xformat">
      <xs:annotation>
        <xs:documentation>
          X-axis number formatting
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="on"/>
              <xs:enumeration value="off"/>
              <xs:enumeration value="2e"/>
              <xs:enumeration value="2f"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="on" name="yformat">
      <xs:annotation>
        <xs:documentation>
          Y-axis number formatting
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="on"/>
              <xs:enumeration value="off"/>
              <xs:enumeration value="2e"/>
              <xs:enumeration value="2f"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="off" name="xzero">
      <xs:annotation>
        <xs:documentation>
          Show x-zero (y=0) axis
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="off"/>
              <xs:enumeration value="line"/>
              <xs:enumeration value="thick-line"/>
              <xs:enumeration value="dotted"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="off" name="yzero">
      <xs:annotation>
        <xs:documentation>
          Show y-zero (x=0) axis
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="off"/>
              <xs:enumeration value="line"/>
              <xs:enumeration value="thick-line"/>
              <xs:enumeration value="dotted"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="lonplot--curve">
    <xs:annotation>
      <xs:documentation>Plot Curve</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:element name="data" type="lonplot--data"/>
      <xs:element name="function" type="lonplot--function"/>
    </xs:choice>
    <xs:attribute default="x000000" name="color" type="color-or-perl">
      <xs:annotation>
        <xs:documentation>
          Color of curve
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="name" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Name of curve to appear in key
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="lines" name="linestyle">
      <xs:annotation>
        <xs:documentation>
          Unless otherwise noted the linestyles require only 2 data sets, X and Y.
          
          - lines: Connect adjacent points with straight line segments.
          - points: Display a small marker at each point.
          - linespoints: Draw both lines and points.
          Draws a small symbol at each point and then connects adjacent points with straight line segments.
          - dots: Place a tiny dots on the given points.
          - steps: Connect points with horizontal lines.
          This style connects consecutive points with two line segments: the first from (x1,y1) to (x2,y1) and the second from (x2,y1) to (x2,y2).
          - fsteps: Connect data with horizontal lines.
          This style connects consecutive points with two line segments: the first from (x1,y1) to (x1,y2) and the second from (x1,y2) to (x2,y2).
          - histeps: Plot as histogram.
          Y-values are assumed to be centered at the x-values; the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to ((x1+x2)/2,y1). The lines representing the end points are extended so that the step is centered on at x. Adjacent points are connected by a vertical line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2).
          - errorbars: Same as yerrorbars.
          - xerrorbars: Draw horizontal error bars around the points.
          Requires 3 or 4 data sets. Either X, Y, Xdelta or X, Y, Xlower, Xupper. Xdelta is a change relative to the given X value. The Xlower and Xupper values are absolute grid coordinates of the upper and lower values to indicated with error bars.
          - yerrorbars: Draw vertical error bars around the points.
          Requires 3 or 4 data sets. Either X, Y, Ydelta or X, Y, Ylower, Yupper. Ydelta is a change relative to the given Y value. The Ylower and Yupper values are the grid coordinates of the upper and lower values to indicate with error bars.
          - xyerrorbars: Draw both vertical and horizontal error bars around the points.
          Requires 4 or 6 data sets. Either X, Y, Xdelta, Ydelta or X, Y, Xlower, Xupper, Ylower, Yupper. Xdelta and Ydelta are relative to the given coordinates. Xlower, Xupper, Ylower, and Yupper are the grid coordinates of the upper and lower values to indicate with the error bars.
          - boxes: Draw a box from the X-axis to the Y-value given.
          Requires either 2 or 3 data sets. Either X, Y or X, Y, Xwidth. In the first case the boxes will be drawn next to eachother. In the latter case Xwidth indicates the horizontal width of the box for the given coordinate.
          - vector: Draws a vector field based on the given data.
          Requires 4 data sets, X, Y, Xdelta, and Ydelta. The ‘vector‘ style draws a vector from (X,Y) to (X+Xdelta,Y+Ydelta). It also draws a small arrowhead at the end of the vector. May not be fully supported by gnuplot.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="lines"/>
              <xs:enumeration value="linespoints"/>
              <xs:enumeration value="dots"/>
              <xs:enumeration value="points"/>
              <xs:enumeration value="steps"/>
              <xs:enumeration value="fsteps"/>
              <xs:enumeration value="histeps"/>
              <xs:enumeration value="errorbars"/>
              <xs:enumeration value="xerrorbars"/>
              <xs:enumeration value="yerrorbars"/>
              <xs:enumeration value="xyerrorbars"/>
              <xs:enumeration value="boxes"/>
              <xs:enumeration value="filledcurves"/>
              <xs:enumeration value="vector"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="1" name="linewidth">
      <xs:annotation>
        <xs:documentation>
          Line width (may not apply to all plot styles)
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:int">
              <xs:minInclusive value="1"/>
              <xs:maxInclusive value="10"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="solid" name="linetype">
      <xs:annotation>
        <xs:documentation>
          Line type (may not apply to all plot styles)
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="solid"/>
              <xs:enumeration value="dashed"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="1" name="pointsize" type="int-or-perl">
      <xs:annotation>
        <xs:documentation>
          Point size (may not apply to all plot styles)
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="1" name="pointtype">
      <xs:annotation>
        <xs:documentation>
          Point type (may not apply to all plot styles)
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:int">
              <xs:minInclusive value="0"/>
              <xs:maxInclusive value="6"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="closed" name="limit">
      <xs:annotation>
        <xs:documentation>
          Point to fill for filled curves
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="above"/>
              <xs:enumeration value="below"/>
              <xs:enumeration value="closed"/>
              <xs:enumeration value="x1"/>
              <xs:enumeration value="x2"/>
              <xs:enumeration value="y1"/>
              <xs:enumeration value="y2"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="head" name="arrowhead">
      <xs:annotation>
        <xs:documentation>
          For vector plots, controls where in the vector the arrow head(s) appear.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="nohead"/>
              <xs:enumeration value="head"/>
              <xs:enumeration value="heads"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="filled" name="arrowstyle">
      <xs:annotation>
        <xs:documentation>
          For vector plots, controls the fill style of the arrow.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="filled"/>
              <xs:enumeration value="empty"/>
              <xs:enumeration value="nofilled"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="0.02" name="arrowlength" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          For vector plots, determines the distance between the vector line end and the tip of the arrow.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="10.0" name="arrowangle" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          For vector plots, determines the angle the arrow branches make with the vector line.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="90.0" name="arrowbackangle" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          For vector plots, determines the angle the arrow lines that return to the main line from the branches make with the arrow branches.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="lonplot--data">
    <xs:annotation>
      <xs:documentation>
        Curve data
        
        The data must be either a perl array, @X, or a comma separated list, such as “0.5,0.9,1.5,2.4” (without quotes). ’NaN’ is a valid value. Note the the ”Y” values are entered in a separate array.
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>
  <xs:complexType mixed="true" name="lonplot--function">
    <xs:annotation>
      <xs:documentation>
        Used to specify the curve to be plotted as a formula, instead of numerical data.
        The function must be a mathematical expression. Use the independent variable “x” for cartesian plots and “t” for polar plots. Implicit multiplication is not accepted by Gnuplot.
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>
  <xs:complexType name="lonplot--key">
    <xs:annotation>
      <xs:documentation>
        Causes a key to be drawn on the plot when it is generated. The key will contain an entry for each curve which has a name.
        The key is the color of the foreground of the plot, specified in the gnuplot element.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="title" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Title of key
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="off" name="box" type="onoff-or-perl">
      <xs:annotation>
        <xs:documentation>
          Draw a box around the key?
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="top right" name="pos">
      <xs:annotation>
        <xs:documentation>
          Position of the key on the plot
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="top left"/>
              <xs:enumeration value="top right"/>
              <xs:enumeration value="bottom left"/>
              <xs:enumeration value="bottom right"/>
              <xs:enumeration value="outside"/>
              <xs:enumeration value="below"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="lonplot--label">
    <xs:annotation>
      <xs:documentation>Plot Label</xs:documentation>
    </xs:annotation>
    <xs:attribute default="0" name="xpos" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          X position of label (graph coordinates)
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="0" name="ypos" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          Y position of label (graph coordinates)
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="left" name="justify">
      <xs:annotation>
        <xs:documentation>
          justification of the label text on the plot
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="left"/>
              <xs:enumeration value="right"/>
              <xs:enumeration value="center"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="0" name="rotate" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          Rotation of label (degrees)
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType abstract="true" name="lonplot--tics">
    <xs:annotation>
      <xs:documentation>Plot tics</xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:element name="tic">
        <xs:annotation>
          <xs:documentation>
            The &lt;tic&gt; element allows users to specify exact Tic positions and labels for each axis.
            In this version we only support level 0 tics (major tic).
            Each tic has associated with it a position and a label $current_tics is a reference to the current tick description hash.
            We add elements to an array in that has: ticspecs whose elements are 'pos' - the tick position and 'label' - the tic label.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
          <xs:attribute name="location" type="real-or-perl" use="required"/>
        </xs:complexType>
      </xs:element>
    </xs:choice>
    <xs:attribute default="border" name="location">
      <xs:annotation>
        <xs:documentation>
          Location of major tic marks
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="border"/>
              <xs:enumeration value="axis"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="on" name="mirror" type="onoff-or-perl">
      <xs:annotation>
        <xs:documentation>
          Mirror tics on opposite axis?
          If the location of tic marks is set to “border” this parameter determines if they are shown on both the top and bottom or right and left sides of the graph. The “mirror” tic marks are unlabelled.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="-10.0" name="start" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          The point in graph coordinates which to start making major tics. This may be less than or greater than the lower limit for the axis.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="1.0" name="increment" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          The span, in graph coordinates, between each major tic mark.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="10.0" name="end" type="real-or-perl">
      <xs:annotation>
        <xs:documentation>
          Stop major tics at.
          This may be less than or greater than the upper limit for the axis.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="0" name="minorfreq" type="int-or-perl">
      <xs:annotation>
        <xs:documentation>
          The number of subdivisions to make of the span between major tic marks. Using a value of “10” leads to 9 minor tic marks.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute default="off" name="rotate" type="onoff-or-perl">
      <xs:annotation>
        <xs:documentation>
          For output devices that support it, this rotates the tic label by 90 degrees. This is most useful with large lables defined by the tic element described below.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="lonplot--xtics">
    <xs:annotation>
      <xs:documentation>Plot xtics</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="lonplot--tics"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="lonplot--ytics">
    <xs:annotation>
      <xs:documentation>Plot ytics</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="lonplot--tics"/>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="lonplot--xlabel">
    <xs:annotation>
      <xs:documentation>Plot x-label</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="lonplot--ylabel">
    <xs:annotation>
      <xs:documentation>Plot y-label</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:complexType name="lonplot--block">
    <xs:annotation>
      <xs:documentation>
        Conditional Block
        
        This has a required argument condition that is evaluated. If the condition is true, everything inside the element is evaluated; otherwise, everything inside the block element is skipped.
        
        When found inside the gnuplot element, a block can only have gnuplot children inside, with no text.
      </xs:documentation>
    </xs:annotation>
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="gnuplot-children"/>
    </xs:choice>
    <xs:attribute name="condition" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Test Condition
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation>
      Task
    </xs:documentation>
  </xs:annotation>
  <xs:element name="Task">
    <xs:annotation>
      <xs:documentation>Root for .task (bridge task) documents</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="IntroParagraph"/>
        <xs:element ref="Setup"/>
        <xs:element ref="Question"/>
        <xs:element ref="Criteria"/>
        <xs:element ref="ClosingParagraph"/>
      </xs:choice>
      <xs:attribute name="OptionalRequired" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Required number of passed optional elements to pass the Task
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="IntroParagraph">
    <xs:annotation>
      <xs:documentation>Introductory Information</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="ClosingParagraph">
    <xs:annotation>
      <xs:documentation>Closing Information</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="Question">
    <xs:annotation>
      <xs:documentation>Question</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="Instance"/>
        <xs:element ref="QuestionText"/>
        <xs:element ref="Question"/>
        <xs:element ref="Criteria"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute default="Y" name="Mandatory">
        <xs:annotation>
          <xs:documentation>
            Passing is Mandatory
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Y"/>
                <xs:enumeration value="N"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="OptionalRequired" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Required number of passed optional elements to pass
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="QuestionText">
    <xs:annotation>
      <xs:documentation>Question Information</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="Setup">
    <xs:annotation>
      <xs:documentation>Setup....</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="Instance"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Instance">
    <xs:annotation>
      <xs:documentation>Specific Question Instance</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="InstanceText"/>
        <xs:element ref="Criteria"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute default="no" name="Disabled" type="yesno-or-perl">
        <xs:annotation>
          <xs:documentation>
            Instance is Disabled
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="OptionalRequired" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Required number of passed optional elements to pass the Instance
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="InstanceText">
    <xs:annotation>
      <xs:documentation>Information for the Instance</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="Criteria">
    <xs:annotation>
      <xs:documentation>Question Criteria</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="GraderNote"/>
        <xs:element ref="CriteriaText"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute default="Y" name="Mandatory">
        <xs:annotation>
          <xs:documentation>
            Passing is Mandatory
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="Y"/>
                <xs:enumeration value="N"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="CriteriaText">
    <xs:annotation>
      <xs:documentation>Criteria Information</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="GraderNote">
    <xs:annotation>
      <xs:documentation>Text to display to Grader</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Problem block elements that cannot be used anywhere text is used.
    </xs:documentation>
  </xs:annotation>
  <xs:element name="part">
    <xs:annotation>
      <xs:documentation>
        Problem Part
        
        This must be below problem if it is going to be used. It does many of the same tasks as problem, but allows multiple separate problems to exist in a single file.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-with-responses"/>
        <xs:group ref="inserts"/>
        <xs:element ref="parameter"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Part ID
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="display" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Displayed Part Description
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="allow">
    <xs:annotation>
      <xs:documentation>File Dependencies</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="src" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Path to the file
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="parserlib" type="xs:anyURI">
    <xs:annotation>
      <xs:documentation>
        Import Tag Definitions
        
        The enclosed filename contains definitions for new tags.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="scriptlib" type="xs:anyURI">
    <xs:annotation>
      <xs:documentation>
        Import Script Library
        
        The enclosed filename contains Perl code to run in the safe space.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="meta">
    <xs:annotation>
      <xs:documentation>
        Custom Metadata for LON-CAPA (as opposed to the HTML meta which should be inside &lt;head&gt;).
        
        Recognized names:
        abstract, author, authorspace, avetries, avetries_list, clear, comefrom, comefrom_list, copyright, correct, count, course, course_list, courserestricted, creationdate, dependencies, depth, difficulty, difficulty_list, disc, disc_list, domain, end, field, firstname, generation, goto, goto_list, groupname, helpful, highestgradelevel, hostname, id, keynum, keywords, language, lastname, lastrevisiondate, lowestgradelevel, middlename, mime, modifyinguser, notes, owner, permanentemail, scope, sequsage, sequsage_list, standards, start, stdno, stdno_list, subject, technical, title, url, username, value, version.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute name="content" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="parameter">
    <xs:annotation>
      <xs:documentation>
        Parameter for a part
        
        parameter is exactly the same as responseparam, but should appear outside of a response element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="id" type="xs:string"/>
      <xs:attribute name="name" type="xs:string"/>
      <xs:attribute name="type" type="xs:string" use="required"/>
      <xs:attribute name="description" type="xs:string"/>
      <xs:attribute name="default" type="xs:string"/>
      <xs:attribute name="display" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Title displayed on the parameter setting screen.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="displaytitle">
    <xs:annotation>
      <xs:documentation>
        This will insert the title of the problem from the metadata of the problem. Only the first displaytitle in a problem will show the title; this allows clean usage of displaytitle in LON-CAPA style files.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="style" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="displayduedate">
    <xs:annotation>
      <xs:documentation>
        This will insert the current due date if one is set in the document.
        It is generated to be inside a table of 1x1 elements.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="style" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            style=“plain” Makes the due date appear without any boxing. If the parameter value is other than “plain”, or if the style parameter is omitted, the due date will be displayed within a box.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="format" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Allows you to control the format of the due date. This is an arbitrary string that can contain any of the following formatting items:
            
            %a Replaced by the abbreviated weekday name according to the current locale.
            %A Replaced by the full weekday name according to the current locale.
            %b The abbreviated month name according to the current locale.
            %B The full month name according to the current locale.
            %c The preferred date and time representation for the current locale (the default format string is just this).
            %C The century number as a two digit integer
            %d The day of the month as a decimal number. Leading zeroes are shown for single digit day numbers.
            %D Equivalent to %m/%d/%y
            %e Like %d but a leadnig zero is replaced by a space.
            %F Equivalent to %Y-%m-%d
            %G The four digit year number.
            %g The two digit year numbger.
            %H The hour as a two digit number in the range 00 thorugh 23.
            %I The hour as a two digit number in the range 00 through 12.
            %j The day your the year in the range 001 through 366.
            %k The hour (24 hour clock), single digits are preceded by a blank.
            %l Like %k but using a 12 hour clock.
            %m The month as a two digit decimal number in the range 01 through 12.
            %M The minute as a two digit decimal number in the range 00 through 59.
            %n A newline character.
            %p AM or PM depending on the time value.
            %P am or pm.
            %r The time in am or pm notation.
            %R Time in 24 hour notatinon (%H:%M). See also %T below.
            %s Number of seconds since midnight of January 1, 1970.
            %S The second as a decimal number int the range 00 through 59.
            %t A horizontal tab character.
            %T The time in 24 hour notation (%H:%M:%S).
            %u Day of the week as a decimal number with Monday as 1.
            %U The week number of the current year in the range 00 through 53. Week 1 is the week containing the first Sunday of the year.
            %V Same as %U but week 1 is the first week with at least 4 days, with Monday being the first day of a week.
            %w Day of the week as a decimal integer in the range 0 through 7, Sunday is 0.
            %W Week number of the current year in the range 00 through 53, where the first Monday of the year is the first day of week 01.
            %x The preferred date notation in the current locale without the time.
            %X The preferred time notation in the current locale without the date.
            %y The year as a decimal number without the century (range 00 through 99).
            %Y The year as a decimal number including the century.
            %% A % character.
            %+ Date and time in the form returned by the Unix date command. 
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="preduedate">
    <xs:annotation>
      <xs:documentation>
        Before Due Date Block
        
        Everything inside is skipped if the problem is after the due date.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-with-responses"/>
        <xs:element ref="displayduedate"/>
        <xs:element ref="displaytitle"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="postanswerdate">
    <xs:annotation>
      <xs:documentation>
        After Answer Date Block
        
        Everything inside is skipped if the problem is before the answer date.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="displayduedate"/>
        <xs:element ref="displaytitle"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="solved">
    <xs:annotation>
      <xs:documentation>
        Block For After Solved
        
        Everything inside is skipped if the problem part is “not solved”.
        
        Should not be used outside of parts in a problem using parts.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:group ref="inserts"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="notsolved">
    <xs:annotation>
      <xs:documentation>
        Block For When Not Solved
        
        Everything inside is skipped if the problem part is “solved”.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-with-responses"/>
        <xs:group ref="inserts"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Non-HTML block elements mixed with text
    </xs:documentation>
  </xs:annotation>
  <xs:element name="import">
    <xs:annotation>
      <xs:documentation>
        Import a File
        
        This causes the parse to read in the file named in the body of the element and parse it as if the entire text of the file had existed at the location of the element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:anyURI">
          <xs:attribute name="id" type="xs:string"/>
          <xs:attribute name="importmode">
            <xs:annotation>
              <xs:documentation>
                Import as
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:union memberTypes="perl">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="problem"/>
                    <xs:enumeration value="part"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:union>
            </xs:simpleType>
          </xs:attribute>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType mixed="true" name="block-base">
    <xs:annotation>
      <xs:documentation>
        Conditional Block
        
        This has a required argument condition that is evaluated. If the condition is true, everything inside the element is evaluated; otherwise, everything inside the block element is skipped.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="condition" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Test Condition
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="block-with-parts">
    <xs:complexContent mixed="true">
      <xs:extension base="block-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-parts"/>
          <xs:group ref="inserts"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="block-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="block-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-responses"/>
          <xs:group ref="inserts"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="block-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="block-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
          <xs:group ref="inserts"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:annotation>
    <xs:documentation>
      see also: lonplot--block
    </xs:documentation>
  </xs:annotation>
  <xs:element name="while">
    <xs:annotation>
      <xs:documentation>
        While Loop Block
        
        This implements a while loop. The required attribute condition is a Perl scriptlet that when evaluated results in a true or false value. If true, the entirety of the text between the whiles is parsed. The condition is tested again, etc. If false, it goes to the next element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:group ref="inserts"/>
        <xs:element ref="parserlib"/>
        <xs:element ref="scriptlib"/>
      </xs:choice>
      <xs:attribute name="condition" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Test Condition
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="tex" type="xs:string">
    <xs:annotation>
      <xs:documentation>
        Print Only Block (using only LaTeX)
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="print">
    <xs:annotation>
      <xs:documentation>
        Print Only Block (using HTML)
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="web">
    <xs:annotation>
      <xs:documentation>
        Web Only Block
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="standalone">
    <xs:annotation>
      <xs:documentation>
        Everything in between the start and end tag is shown only on the web and only if the resource is not part of a course.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:complexType mixed="true" name="problemtype-base">
    <xs:annotation>
      <xs:documentation>
        Problem Type Block
        
        Allows you to show or hide output based on what the problem-type parameter is set to in the course.
        Will only show the output text when the problem is set to the type of exam or survey in the course.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute default="show" name="mode">
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="show"/>
              <xs:enumeration value="hide"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute default="exam" name="for">
      <xs:annotation>
        <xs:documentation>
          When used as type(s)
          
          Comma-separated list of values among:
          exam, survey, surveycred, anonsurvey, anonsurveycred, problem, practice, randomizetry
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:pattern value="(exam|survey|surveycred|anonsurvey|anonsurveycred|problem|practice|randomizetry)(\s*,\s*(exam|survey|surveycred|anonsurvey|anonsurveycred|problem|practice|randomizetry))*"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="problemtype-with-parts">
    <xs:complexContent mixed="true">
      <xs:extension base="problemtype-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-parts"/>
          <xs:group ref="inserts"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="problemtype-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="problemtype-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-responses"/>
          <xs:group ref="inserts"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="problemtype-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="problemtype-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
          <xs:group ref="inserts"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="randomlist-base">
    <xs:annotation>
      <xs:documentation>
        Randomly Parsed Block
        
        The enclosed elements are parsed in a stable random order. The optional attribute show=“N” restricts the number of elements inside that are actually parsed to no more than N. N can equal the total elements inside. The randomlist element can be used to randomize problem parts by wrapping the &lt;part&gt; elements with a randomlist element. Note that when randomlist wraps &lt;part&gt; elements, that all students will work all parts only if show=“N” where N is the total number of parts wrapped. When N is less than the total number of parts wrapped, there will be gaps in the assessment chart, and also in the table of submissions for each student, corresponding to those parts which are never available to that particular student.
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="show" type="int-or-perl">
      <xs:annotation>
        <xs:documentation>
          Maximum Tags to Show
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="randomlist-with-parts">
    <xs:complexContent>
      <xs:extension base="randomlist-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:element ref="part"/>
          <xs:group ref="responses"/>
          <xs:element ref="img"/>
          <xs:element ref="postanswerdate"/>
          <xs:element ref="preduedate"/>
          <xs:element name="block" type="block-with-parts"/>
          <xs:element ref="while"/>
          <xs:element name="problemtype" type="problemtype-with-parts"/>
          <xs:element ref="window"/>
          <xs:element ref="display"/>
          <xs:element ref="gnuplot"/>
          <xs:element ref="organicstructure"/>
          <xs:element ref="instructorcomment"/>
          <xs:element ref="drawimage"/>
          <xs:element ref="import"/>
          
          <xs:element name="section" type="section-with-parts"/>
          <xs:element name="ul" type="ul-with-parts"/>
          <xs:element name="ol" type="ol-with-parts"/>
          <xs:element name="table" type="table-with-parts"/>
          <xs:element name="dl" type="dl-with-parts"/>
          <xs:element ref="object"/>
          <xs:element ref="applet"/>
          <xs:element ref="embed"/>
          <xs:element ref="video"/>
          <xs:element ref="audio"/>
          <xs:element ref="canvas"/>
          <xs:element ref="form"/>
          <xs:element ref="iframe"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="randomlist-with-responses">
    <xs:complexContent>
      <xs:extension base="randomlist-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="responses"/>
          <xs:element ref="img"/>
          <xs:element ref="postanswerdate"/>
          <xs:element ref="preduedate"/>
          <xs:element name="block" type="block-with-responses"/>
          <xs:element ref="while"/>
          <xs:element name="problemtype" type="problemtype-with-responses"/>
          <xs:element ref="window"/>
          <xs:element ref="display"/>
          <xs:element ref="gnuplot"/>
          <xs:element ref="organicstructure"/>
          <xs:element ref="instructorcomment"/>
          <xs:element ref="drawimage"/>
          <xs:element ref="import"/>
          
          <xs:element name="section" type="section-with-responses"/>
          <xs:element name="ul" type="ul-with-responses"/>
          <xs:element name="ol" type="ol-with-responses"/>
          <xs:element name="table" type="table-with-responses"/>
          <xs:element name="dl" type="dl-with-responses"/>
          <xs:element ref="object"/>
          <xs:element ref="applet"/>
          <xs:element ref="embed"/>
          <xs:element ref="video"/>
          <xs:element ref="audio"/>
          <xs:element ref="canvas"/>
          <xs:element ref="form"/>
          <xs:element ref="iframe"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="randomlist-with-text">
    <xs:complexContent>
      <xs:extension base="randomlist-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:element ref="img"/>
          <xs:element ref="postanswerdate"/>
          <xs:element ref="preduedate"/>
          <xs:element name="block" type="block-with-text"/>
          <xs:element ref="while"/>
          <xs:element name="problemtype" type="problemtype-with-text"/>
          <xs:element ref="window"/>
          <xs:element ref="display"/>
          <xs:element ref="gnuplot"/>
          <xs:element ref="organicstructure"/>
          <xs:element ref="instructorcomment"/>
          <xs:element ref="drawimage"/>
          <xs:element ref="import"/>
          
          <xs:element name="section" type="section-with-text"/>
          <xs:element name="ul" type="ul-with-text"/>
          <xs:element name="ol" type="ol-with-text"/>
          <xs:element name="table" type="table-with-text"/>
          <xs:element name="dl" type="dl-with-text"/>
          <xs:element ref="object"/>
          <xs:element ref="applet"/>
          <xs:element ref="embed"/>
          <xs:element ref="video"/>
          <xs:element ref="audio"/>
          <xs:element ref="canvas"/>
          <xs:element ref="form"/>
          <xs:element ref="iframe"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="languageblock">
    <xs:annotation>
      <xs:documentation>
        This declares the intent to provide content that can be rendered in the set of languages in the include specification but not in the exclude specification. If a currently preferred language is in the include list the content in the &lt;languageblock&gt;...&lt;/languageblock&gt; is rendered If the currently preferred language is in the exclude list, the content in the &lt;languageblock&gt;..&lt;/languageblock is not rendered.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attribute name="include" type="xs:string"/>
      <xs:attribute name="exclude" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="translated">
    <xs:annotation>
      <xs:documentation>
        &lt;translated&gt; starts a block of a resource that has multiple translations.
        See the &lt;lang&gt; element as well.
        When &lt;/translated&gt; is encountered if there is a translation for the currently preferred language, that is rendered inthe web/tex/webgrade targets. Otherwise, the default text is rendered.
        Note that &lt;lang&gt; is only registered for the duration of the &lt;translated&gt;...&lt;/translated&gt; block.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:element ref="lang"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="lang">
    <xs:annotation>
      <xs:documentation>
        Specifies that the block contained within it is a translation for a specific language specified by the 'which' attribute. The 'other' attribute can be used by itself or in conjunction with which to specify this element _may_ be used as a translation for some list of languages. e.g.:
        &lt;lang which='senisoUS' other='senisoCA,senisoAU,seniso'&gt;
        specifying that the block provides a translation for US (primary) Canadian, Australian and UK English.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attribute name="which" type="xs:string"/>
      <xs:attribute name="other" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="window">
    <xs:annotation>
      <xs:documentation>
        Text In Separate Window
        
        This creates a link that when clicked shows the intervening information in a pop-up window. By default the window will be 500 pixels wide and 200 pixels tall, and the link text will be a superscript * (so as to look like a footnote). These can be changed using the attributes.
        When printing, the included text will get turned into a real footnote.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
        <xs:group ref="inserts"/>
      </xs:choice>
      <xs:attribute name="linktext" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Text of Link
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="200" name="height" type="int-or-perl"/>
      <xs:attribute default="500" name="width" type="int-or-perl"/>
      <xs:attribute name="printtext" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Printed text (optional)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="windowlink">
    <xs:annotation>
      <xs:documentation>
        This creates a link to a resource that comes up in a pop-up window.
        The link will be the intervening information between the start and the end tag.
        By default the window will be 500 pixels wide and 200 pixels tall.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attribute name="href" type="xs:anyURI"/>
      <xs:attribute name="height" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            starting height of the popup window
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="width" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            starting width of the popup window
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="togglebox">
    <xs:annotation>
      <xs:documentation>
        This creates a toggling box that can be clicked open and close.
        When printing, the included text will be rendered in a visible box.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attribute name="heading" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            heading text of the box, by default no heading
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="headerbg" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            background color of the header, by default white
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="showtext" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            the text that appears to make the box visible, by default the translation of ’show’
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="hidetext" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            the text that appears to hide the box again, by default the translation of ’hide’
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="instructorcomment">
    <xs:annotation>
      <xs:documentation>
        Comment that is hidden if form.instructor_comments='hide'.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="comment">
    <xs:annotation>
      <xs:documentation>
        Allows one to comment out sections of code in a balanced manner, or to provide a comment description of how a problem works.
        The content is ignored.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="part"/>
        <xs:group ref="text-with-responses"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="organicstructure">
    <xs:annotation>
      <xs:documentation>Organic Structure</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="width" type="int-or-perl">
        <xs:annotation>
          <xs:documentation>
            Width (pixels)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="texwidth" type="decimal-or-perl">
        <xs:annotation>
          <xs:documentation>
            TeXwidth (mm)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="molecule" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            JME string
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="options">
        <xs:annotation>
          <xs:documentation>
            Comma-separated list of options:
            reaction: is a reaction (note: setting this option is only useful for the editor, it does not change the resulting image)
            border: draws a border around the image
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="reaction|border|reaction\s*,\s*border|border\s*,\s*reaction"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="drawimage">
    <xs:annotation>
      <xs:documentation>
        Draws an image with the specified objects using pixel coordinates (text, line, rectangle, arc, fill, polygon, image).
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element name="text">
          <xs:complexType mixed="true">
            <xs:attribute name="x" type="int-or-perl" use="required"/>
            <xs:attribute name="y" type="int-or-perl" use="required"/>
            <xs:attribute name="font" type="xs:string"/>
            <xs:attribute name="color" type="xs:string"/>
            <xs:attribute name="direction" type="xs:string"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="line">
          <xs:complexType>
            <xs:attribute name="x1" type="int-or-perl" use="required"/>
            <xs:attribute name="y1" type="int-or-perl" use="required"/>
            <xs:attribute name="x2" type="int-or-perl" use="required"/>
            <xs:attribute name="y2" type="int-or-perl" use="required"/>
            <xs:attribute name="color" type="xs:string"/>
            <xs:attribute name="thickness" type="int-or-perl"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="rectangle">
          <xs:complexType>
            <xs:attribute name="x1" type="int-or-perl" use="required"/>
            <xs:attribute name="y1" type="int-or-perl" use="required"/>
            <xs:attribute name="x2" type="int-or-perl" use="required"/>
            <xs:attribute name="y2" type="int-or-perl" use="required"/>
            <xs:attribute name="color" type="xs:string"/>
            <xs:attribute name="thickness" type="int-or-perl"/>
            <xs:attribute name="filled" type="xs:string"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="arc">
          <xs:complexType>
            <xs:attribute name="x" type="int-or-perl" use="required"/>
            <xs:attribute name="y" type="int-or-perl" use="required"/>
            <xs:attribute name="width" type="int-or-perl" use="required"/>
            <xs:attribute name="height" type="int-or-perl" use="required"/>
            <xs:attribute name="start" type="real-or-perl"/>
            <xs:attribute name="end" type="real-or-perl"/>
            <xs:attribute name="color" type="xs:string"/>
            <xs:attribute name="thickness" type="int-or-perl"/>
            <xs:attribute name="filled" type="xs:string"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="fill">
          <xs:complexType>
            <xs:attribute name="x" type="int-or-perl" use="required"/>
            <xs:attribute name="y" type="int-or-perl" use="required"/>
            <xs:attribute name="color" type="xs:string"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="polygon">
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="point">
                <xs:complexType>
                  <xs:attribute name="x" type="int-or-perl" use="required"/>
                  <xs:attribute name="y" type="int-or-perl" use="required"/>
                </xs:complexType>
              </xs:element>
            </xs:choice>
            <xs:attribute name="color" type="xs:string"/>
            <xs:attribute name="filled" type="xs:string"/>
            <xs:attribute name="open" type="xs:string"/>
            <xs:attribute name="thickness" type="int-or-perl"/>
          </xs:complexType>
        </xs:element>
        <xs:element name="image">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:anyURI">
                <xs:attribute name="x" type="int-or-perl" use="required"/>
                <xs:attribute name="y" type="int-or-perl" use="required"/>
                <xs:attribute name="clipx" type="int-or-perl"/>
                <xs:attribute name="clipy" type="int-or-perl"/>
                <xs:attribute name="clipwidth" type="int-or-perl"/>
                <xs:attribute name="clipheight" type="int-or-perl"/>
                <xs:attribute name="scaledwidth" type="int-or-perl"/>
                <xs:attribute name="scaledheight" type="int-or-perl"/>
                <xs:attribute name="transparent" type="xs:string"/>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
      </xs:choice>
      <xs:attribute default="300" name="width" type="int-or-perl"/>
      <xs:attribute default="300" name="height" type="int-or-perl"/>
      <xs:attribute name="bgcolor" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  
  <xs:annotation>
    <xs:documentation>
      Non-HTML inline elements mixed with text
    </xs:documentation>
  </xs:annotation>
  <xs:element name="display" type="xs:string">
    <xs:annotation>
      <xs:documentation>
        Display Script Result Block
        
        The intervening Perl script is evaluated in the safe space and the return value of the script replaces the entire element.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="m">
    <xs:annotation>
      <xs:documentation>
        The inside text is LaTeX, and is converted to HTML (or MathML) on the fly.
        This element is normally used for math, and the text should start and end with either $ or $$.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attribute name="display" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Option to force the math rendering for this element.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="off" name="eval" type="onoff-or-perl">
        <xs:annotation>
          <xs:documentation>
            Perl variables inside the element will be evaluated if this attribute value is "on".
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="lm">
    <xs:annotation>
      <xs:documentation>
        Inline math with the LON-CAPA syntax (use &lt;m&gt; for LaTeX math).
        Perl variables are evaluated.
        The expression is interpreted with implicit operators (for multiplication or units).
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute default="symbols" name="mode">
            <xs:annotation>
              <xs:documentation>
                In symbols mode, names are interpreted as constants or variables.
                In units mode, names are interpreted as constants or units.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="symbols"/>
                <xs:enumeration value="units"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="num">
    <xs:annotation>
      <xs:documentation>
        Typesets a number formatted in scientific notation, fixed point, fixed point with commas, fixed point with commas and dollar sign, or in significant digits.
        
        &lt;num format="2E"&gt;31454678&lt;/num&gt; results in 3.15 x 10^7
        &lt;num format="2f"&gt;31454678&lt;/num&gt; results in 31454678.00
        &lt;num format="4g"&gt;31454678&lt;/num&gt; results in 3.145 x 10^7
        &lt;num format="4g"&gt;314.54678&lt;/num&gt; results in 314.5
        &lt;num format=",2f"&gt;31454678&lt;/num&gt; results in 31,454,678.00
        &lt;num format="$2f"&gt;31454678&lt;/num&gt; results in $31,454,678.00
        &lt;num format="2s"&gt;31454678&lt;/num&gt; results in 31000000
        &lt;num format=",2s"&gt;31454678&lt;/num&gt; results in 31,000,000
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attribute name="format" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="algebra">
    <xs:annotation>
      <xs:documentation>
        Typesets algebraic expressions.
        Expressions are displayed using the math expression display mechanism defined in the user’s preferences. The default is tth.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attribute name="style" type="xs:string"/>
      <xs:attribute name="display" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Option to force the math rendering for this element.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="chem" type="xs:string">
    <xs:annotation>
      <xs:documentation>
        Typesets chemical equation
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="parse" type="xs:string">
    <xs:annotation>
      <xs:documentation>
        Evaluates the Perl content, then parses it as if it was part of the XML document and displays the result.
        
        Warning: using this element (or the xmlparse function) will reduce the document future interoperability, because dynamically generated XML cannot be automatically converted.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="displayweight">
    <xs:annotation>
      <xs:documentation>
        Displays the number of points awarded for this problem or problem part.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="displaystudentphoto">
    <xs:complexType>
      <xs:attribute name="width" type="int-or-perl"/>
      <xs:attribute name="height" type="int-or-perl"/>
      <xs:attribute name="align">
        <xs:annotation>
          <xs:documentation>
            note: this attribute is not supported in HTML5, css should be used instead !
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="left"/>
                <xs:enumeration value="right"/>
                <xs:enumeration value="middle"/>
                <xs:enumeration value="top"/>
                <xs:enumeration value="bottom"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  
  <xs:annotation>
    <xs:documentation>
      HTML
    </xs:documentation>
  </xs:annotation>
  <xs:attributeGroup name="coreattrs">
    <xs:annotation>
      <xs:documentation>
        core attributes common to most HTML elements
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="id" type="xs:ID">
      <xs:annotation>
        <xs:documentation>
          This attribute defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).
          
          Usage note:
          - This attribute's value is an opaque string: this means that web author must not use it to convey any information. Particular meaning, for example semantic meaning, must not be derived from the string.
          - This attribute's value must not contain white spaces. Browsers treat non-conforming IDs that contains white spaces as if the white space is part of the ID. In contrast to the class attribute, which allows space-separated values, elements can only have one single ID defined through the id attribute. Note that an element may have several IDs, but the others should be set by another means, such as via a script interfacing with the DOM interface of the element.
          - Using characters except ASCII letters and digits, '_', '-' and '.' may cause compatibility problems, as they weren't allowed in HTML 4. Though this restriction has been lifted in HTML 5, an ID should start with a letter for compatibility.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="class" type="xs:NMTOKENS">
      <xs:annotation>
        <xs:documentation>
          This attribute is a space-separated list of the classes of the element. Classes allows CSS and Javascript to select and access specific elements via the class selectors or functions like the DOM method document.getElementsByClassName.
          
          Usage note: Though the specification doesn't put requirements on the name of classes, web developers are encouraged to use names that describe the semantic purpose of the element, rather to the presentation of the element (e.g., attribute to describe an attribute rather than italics, although an element of this class may be presented by italics). Semantic names remain logical even if the presentation of the page changes.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="style" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          This attribute contains CSS styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the &lt;style&gt; element have mainly the purpose of allowing for quick styling, for example for testing purposes.
          
          Usage note: This attribute must not be used to convey semantic information. Even if all styling is removed, a page should remain semantically correct. Typically it shouldn't be used to hide irrelevant information; this should be done using the hidden attribute.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:attributeGroup name="i18n">
    <xs:annotation>
      <xs:documentation>
        internationalization attributes
        lang language code (backwards compatible)
        xml:lang language code (as per XML 1.0 spec)
        dir direction for weak/neutral text
      </xs:documentation>
    </xs:annotation>
    <xs:attribute name="lang" type="xs:language"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="dir">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="ltr"/>
          <xs:enumeration value="rtl"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:complexType mixed="true" name="inlineBaseType">
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="inlines"/>
    </xs:choice>
  </xs:complexType>
  <xs:group name="heading">
    <xs:choice>
      <xs:element ref="h1"/>
      <xs:element ref="h2"/>
      <xs:element ref="h3"/>
      <xs:element ref="h4"/>
      <xs:element ref="h5"/>
      <xs:element ref="h6"/>
    </xs:choice>
  </xs:group>
  <xs:complexType mixed="true" name="headerContent">
    <xs:choice maxOccurs="unbounded" minOccurs="0">
      <xs:group ref="inlines"/>
    </xs:choice>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute ref="TeXsize"/>
  </xs:complexType>
  
  <xs:element name="html">
    <xs:annotation>
      <xs:documentation>
        The HTML root element (&lt;html&gt;) represents the root of an HTML document.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="head"/>
        <xs:element ref="body"/>
        <xs:element ref="allow" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="i18n"/>
      <xs:attribute name="id" type="xs:ID"/>
    </xs:complexType>
  </xs:element>
  <xs:group name="head.misc">
    <xs:sequence>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="script"/>
        <xs:element ref="style"/>
        <xs:element name="meta" type="htmlMeta"/>
        <xs:element ref="link"/>
        <xs:element ref="import"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>
  <xs:element name="head">
    <xs:annotation>
      <xs:documentation>
        The HTML Head Element (&lt;head&gt;) provides general information (metadata) about the document, including its title and links to or definitions of scripts and style sheets.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:group ref="head.misc"/>
        <xs:choice minOccurs="0">
          <xs:sequence>
            <xs:element ref="title"/>
            <xs:group ref="head.misc"/>
            <xs:sequence minOccurs="0">
              <xs:element ref="base"/>
              <xs:group ref="head.misc"/>
            </xs:sequence>
          </xs:sequence>
          <xs:sequence>
            <xs:element ref="base"/>
            <xs:group ref="head.misc"/>
            <xs:sequence minOccurs="0">
              <xs:element ref="title"/>
              <xs:group ref="head.misc"/>
            </xs:sequence>
          </xs:sequence>
        </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="i18n"/>
      <xs:attribute name="id" type="xs:ID"/>
      <xs:attribute name="profile" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The URIs of one or more metadata profiles, separated by white space.
            
            This attribute is obsolete in HTML5.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="title">
    <xs:annotation>
      <xs:documentation>
        The title element is not considered part of the flow of text.
        It should be displayed, for example as the page header or
        window title. Exactly one title is required per document.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attributeGroup ref="i18n"/>
      <xs:attribute name="id" type="xs:ID"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="base">
    <xs:annotation>
      <xs:documentation>
        The HTML Base Element (&lt;base&gt;) specifies the base URL to use for all relative URLs contained within a document. There can be only one &lt;base&gt; element in a document.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="href" type="xs:anyURI" use="required"/>
      <xs:attribute name="id" type="xs:ID"/>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="htmlMeta">
    <xs:annotation>
      <xs:documentation>
        The HTML Meta Element (&lt;meta&gt;) represents any metadata information that cannot be represented by one of the other HTML meta-related elements (&lt;base&gt;, &lt;link&gt;, &lt;script&gt;, &lt;style&gt; or &lt;title&gt;).

        Depending on the attributes set, the kind of metadata can be one of the following:
        - If name is set, it is document-level metadata, applying to the whole page.
        - If http-equiv is set, it is a pragma directive, i.e. information normally given by the web server about how the - web page should be served.
        - If charset is set, it is a charset declaration, i.e. the charset used for the serialized form of the webpage. HTML5
        - if the itemprop is set, a user-defined metadata, transparent for the user-agent as the semantics of the metadata is user-specific.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="i18n"/>
    <xs:attribute name="id" type="xs:ID"/>
    <xs:attribute name="http-equiv">
      <xs:annotation>
        <xs:documentation>
          This enumerated attribute defines the pragma that can alter servers and user-agents behavior. The value of the pragma is defined using the content and can be one of the following: 
          - content-language (obsolete)
          - content-type (obsolete)
          - default-style
          - refresh
          - set-cookie (obsolete)
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="name">
      <xs:annotation>
        <xs:documentation>
          This attribute defines the name of a document-level metadata. It should not be set if one of the attributes itemprop, http-equiv or charset is also set.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="content" use="required">
      <xs:annotation>
        <xs:documentation>
          This attribute gives the value associated with the http-equiv or name attribute, depending of the context.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="scheme">
      <xs:annotation>
        <xs:documentation>
          This attribute defines the scheme in which the metadata is described. A scheme is a context leading to the correct interpretations of the content value, like a format.
          
          Notes: Do not use this attribute as it is obsolete. There is no replacement for it as there was no real usage for it. Omit it altogether.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:simpleType name="MediaDesc">
    <xs:annotation>
      <xs:documentation>
        Single or comma-separated list of media descriptors
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[^,]+(,\s*[^,]+)*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="link">
    <xs:annotation>
      <xs:documentation>
        The HTML Link Element (&lt;link&gt;) specifies relationships between the current document and external resource. Possible uses for this element include defining a relational framework for navigation. This Element is most used to link to style sheets.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="charset" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            This attribute defines the character encoding of the linked resource. The value is a space- and/or comma-delimited list of character sets as defined in RFC 2045. The default value is ISO-8859-1.
            
            Usage note: This attribute is obsolete in HTML5 and must not be used by authors. To achieve its effect, use the Content-Type: HTTP header on the linked resource.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="href" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            This attribute specifies the URL of the linked resource. A URL might be absolute or relative.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="hreflang" type="xs:language">
        <xs:annotation>
          <xs:documentation>
            This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by BCP47 for HTML5 and by RFC1766 for HTML 4. Use this attribute only if the href attribute is present.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="type" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as text/html, text/css, and so on. The common use of this attribute is to define the type of style sheet linked and the most common current value is text/css, which indicates a Cascading Style Sheet format.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="rel" type="xs:NMTOKENS">
        <xs:annotation>
          <xs:documentation>
            This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the link types values. The most common use of this attribute is to specify a link to an external style sheet: the rel attribute is set to stylesheet, and the href attribute is set to the URL of an external style sheet to format the page. WebTV also supports the use of the value next for rel to preload the next page in a document series.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="rev" type="xs:NMTOKENS">
        <xs:annotation>
          <xs:documentation>
            The value of this attribute shows the relationship of the current document to the linked document, as defined by the href attribute. The attribute thus defines the reverse relationship compared to the value of the rel attribute. Link types values for the attribute are similar to the possible values for rel.
            
            Usage note: This attribute is obsolete in HTML5. Do not use it. To achieve its effect, use the rel attribute with the opposite link types values, e.g. made should be replaced by author. Also this attribute doesn't mean revision and must not be used with a version number, which is unfortunately the case on numerous sites.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="media" type="MediaDesc">
        <xs:annotation>
          <xs:documentation>
            This attribute specifies the media which the linked resource applies to. Its value must be a media query. This attribute is mainly useful when linking to external stylesheets by allowing the user agent to pick the best adapted one for the device it runs on.
            
            Usage note:
            
            - In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., media types and groups, where defined and allowed as values for this attribute, such as print, screen, aural, braille. HTML5 extended this to any kind of media queries, which are a superset of the allowed values of HTML 4.
            
            - Browsers not supporting the CSS3 Media Queries won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="style">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;style&gt; element contains style information for a document, or a part of document. The specific style information is contained inside of this element, usually in the CSS.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attributeGroup ref="i18n"/>
      <xs:attribute name="id" type="xs:ID"/>
      <xs:attribute default="text/css" name="type" type="xs:string"/>
      <xs:attribute name="media" type="MediaDesc"/>
      <xs:attribute name="title" type="xs:string"/>
      <xs:attribute fixed="preserve" ref="xml:space"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="script">
    <xs:annotation>
      <xs:documentation>
        Perl Script Block or Javascript
        
        If the attribute type is set to “loncapa/perl” the enclosed data is a Perl script which is evaluated inside the Perl safe space. The return value of the script is ignored.
        
        The HTML &lt;script&gt; element is used to embed or reference an executable script within an HTML or XHTML document.
        
        Scripts without async or defer attributes, as well as inline scripts, are fetched and executed immediately, before the browser continues to parse the page.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attribute name="id" type="xs:ID"/>
      <xs:attribute name="charset" type="xs:string"/>
      <xs:attribute name="src" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document. script elements with an src attribute specified should not have a script embedded within its tags.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="text/javascript" name="type" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            This attribute identifies the scripting language of code embedded within a script element or referenced via the element’s src attribute. This is specified as a MIME type; examples of supported MIME types include text/javascript, text/ecmascript, application/javascript, and application/ecmascript.
            
            If the attribute type is set to “loncapa/perl” the enclosed data is a Perl script which is evaluated inside the Perl safe space. The return value of the script is ignored.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="language" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Like the type attribute, this attribute identifies the scripting language in use. Unlike the type attribute, however, this attribute’s possible values were never standardized. The type attribute should be used instead.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="defer">
        <xs:annotation>
          <xs:documentation>
            This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed. Since this feature hasn't yet been implemented by all other major browsers, authors should not assume that the script’s execution will actually be deferred. The defer attribute shouldn't be used on scripts that don't have the src attribute. Since Gecko 1.9.2, the defer attribute is ignored on scripts that don't have the src attribute. However, in Gecko 1.9.1 even inline scripts are deferred if the defer attribute is set.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="defer"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="async">
        <xs:annotation>
          <xs:documentation>
            HTML5 only.
            Set this Boolean attribute to indicate that the browser should, if possible, execute the script asynchronously. It has no effect on inline scripts (i.e., scripts that don't have the src attribute).
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="async"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute fixed="preserve" ref="xml:space"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="noscript">
    <xs:annotation>
      <xs:documentation>
        Alternate content container for non script-based rendering.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="blocks-with-text"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="body">
    <xs:annotation>
      <xs:documentation>
        The HTML Body Element (&lt;body&gt;) represents the content of an HTML document. There can be only one &lt;body&gt; element in a document.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="blocks-with-text"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attributeGroup ref="i18n"/>
      <xs:attribute name="onload" type="xs:string"/>
      <xs:attribute name="onunload" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:complexType mixed="true" name="section-base">
    <xs:annotation>
      <xs:documentation>
        The HTML Section Element (&lt;section&gt;) represents a generic section of a document, i.e., a thematic grouping of content, typically with a heading. Each &lt;section&gt; should be identified, typically by including a heading (h1-h6 element) as a child of the &lt;section&gt; element.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="section-with-parts">
    <xs:complexContent mixed="true">
      <xs:extension base="section-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-parts"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="section-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="section-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-responses"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="section-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="section-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="header">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;header&gt; Element represents a group of introductory or navigational aids. It may contain some heading elements but also other elements like a logo, wrapped section's header, a search form, and so on.
        
        This element should have no &lt;footer&gt; or &lt;header&gt; descendants.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="footer">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;footer&gt; Element represents a footer for its nearest sectioning content or sectioning root element (i.e, its nearest parent &lt;article&gt;, &lt;aside&gt;, &lt;nav&gt;, &lt;section&gt;, &lt;blockquote&gt;, &lt;body&gt;, &lt;details&gt;, &lt;fieldset&gt;, &lt;figure&gt;, &lt;td&gt;). A footer typically contains information about the author of the section, copyright data or links to related documents.
        
        This element should have no &lt;footer&gt; or &lt;header&gt; descendants.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="aside">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;aside&gt; element represents a section of the page with content connected tangentially to the rest, which could be considered separate from that content. These sections are often represented as sidebars or inserts. They often contain the definitions on the sidebars, such as definitions from the glossary; there may also be other types of information, such as related advertisements; the biography of the author; web applications; profile information or related links on the blog.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="h1" type="headerContent">
    <xs:annotation>
      <xs:documentation>
        Level 1 title (most important).
        
        A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
        
        Inside HTML5 sections, all the heading elements can be h1 (they don't need to be h1, h2, ...). Web browsers determine the level of the heading based on the depth in the section tree.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="h2" type="headerContent">
    <xs:annotation>
      <xs:documentation>
        Level 2 title
        
        A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="h3" type="headerContent">
    <xs:annotation>
      <xs:documentation>
        Level 3 title
        
        A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="h4" type="headerContent">
    <xs:annotation>
      <xs:documentation>
        Level 4 title
        
        A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="h5" type="headerContent">
    <xs:annotation>
      <xs:documentation>
        Level 5 title
        
        A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="h6" type="headerContent">
    <xs:annotation>
      <xs:documentation>
        Level 6 title
        
        A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType mixed="true" name="div-base">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;div&gt; element (or HTML Document Division Element) is the generic container for flow content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element (such as &lt;article&gt; or &lt;nav&gt;) is appropriate.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute name="align">
      <xs:annotation>
        <xs:documentation>
          In HTML5, the align attribute on &lt;div&gt; is obsolete.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="center"/>
          <xs:enumeration value="left"/>
          <xs:enumeration value="right"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="div-with-parts">
    <xs:complexContent mixed="true">
      <xs:extension base="div-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-parts"/>
          <xs:group ref="inserts"/>
          <xs:element ref="allow"/>
          <xs:element ref="meta"/>
          <xs:element ref="parameter"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="div-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="div-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-responses"/>
          <xs:group ref="inserts"/>
          <xs:element ref="allow"/>
          <xs:element ref="meta"/>
          <xs:element ref="parameter"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="div-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="div-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
          <xs:group ref="inserts"/>
          <xs:element ref="meta"/>
          <xs:element ref="parameter"/>
          <xs:element ref="parserlib"/>
          <xs:element ref="scriptlib"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="p-base">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;p&gt; element (or HTML Paragraph Element) represents a paragraph of text. Paragraphs are block-level elements.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
  </xs:complexType>
  <xs:complexType mixed="true" name="p-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="p-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="inlines"/>
          <xs:group ref="inlineResponses"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="p-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="p-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="inlines"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ul-base">
    <xs:annotation>
      <xs:documentation>
        The HTML unordered list element (&lt;ul&gt;) represents an unordered list of items, namely a collection of items that do not have a numerical ordering, and their order in the list is meaningless. Typically, unordered-list items are displayed with a bullet, which can be of several forms, like a dot, a circle or a squared. The bullet style is not defined in the HTML description of the page, but in its associated CSS, using the list-style-type property.
        
        There is no limitation to the depth and imbrication of lists defined with the &lt;ol&gt; and &lt;ul&gt; elements.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute name="type" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Used to set the bullet style for the list. The values defined under HTML3.2 and the transitional version of HTML 4.0/4.01 are:
          - circle,
          - disc,
          - and square.
          
          A fourth bullet type has been defined in the WebTV interface, but not all browsers support it: triangle.
          
          If not present and if no CSS list-style-type property does apply to the element, the user agent decide to use a kind of bullets depending on the nesting level of the list.
          Usage note: Do not use this attribute, as it has been deprecated; use the CSS list-style-type property instead.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="ul-with-parts">
    <xs:complexContent>
      <xs:extension base="ul-base">
        <xs:sequence maxOccurs="unbounded">
          <xs:element name="li" type="li-with-parts"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ul-with-responses">
    <xs:complexContent>
      <xs:extension base="ul-base">
        <xs:sequence maxOccurs="unbounded">
          <xs:element name="li" type="li-with-responses"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ul-with-text">
    <xs:complexContent>
      <xs:extension base="ul-base">
        <xs:sequence maxOccurs="unbounded">
          <xs:element name="li" type="li-with-text"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ol-base">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;ol&gt; Element (or HTML Ordered List Element) represents an ordered list of items. Typically, ordered-list items are displayed with a preceding numbering, which can be of any form, like numerals, letters or Romans numerals or even simple bullets. This numbered style is not defined in the HTML description of the page, but in its associated CSS, using the list-style-type property.
        
        There is no limitation to the depth and overlap of lists defined with the &lt;ol&gt; and &lt;ul&gt; elements.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute name="type" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Indicates the numbering type:
          - 'a' indicates lowercase letters,
          - 'A' indicates uppercase letters,
          - 'i' indicates lowercase Roman numerals,
          - 'I' indicates uppercase Roman numerals,
          - and '1' indicates numbers (default).
          
          The type set is used for the entire list unless a different type attribute is used within an enclosed &lt;li&gt; element.
          
          Note: This attribute was deprecated in HTML4, but reintroduced in HTML5. Unless the value of the list number matters (e.g. in legal or technical documents where items are to be referenced by their number/letter), the CSS list-style-type property should be used instead.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="ol-with-parts">
    <xs:complexContent>
      <xs:extension base="ol-base">
        <xs:sequence maxOccurs="unbounded">
          <xs:element name="li" type="li-with-parts"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ol-with-responses">
    <xs:complexContent>
      <xs:extension base="ol-base">
        <xs:sequence maxOccurs="unbounded">
          <xs:element name="li" type="li-with-responses"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ol-with-text">
    <xs:complexContent>
      <xs:extension base="ol-base">
        <xs:sequence maxOccurs="unbounded">
          <xs:element name="li" type="li-with-text"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="li-base">
    <xs:annotation>
      <xs:documentation>
        The HTML List Item Element (&lt;li&gt;) is used to represent an item in a list. It must be contained in a parent element: an ordered list (&lt;ol&gt;), an unordered list (&lt;ul&gt;), or a menu (&lt;menu&gt;). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute name="type" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          This character attributes indicates the numbering type:
          
          a: lowercase letters
          A: uppercase letters
          i: lowercase Roman numerals
          I: uppercase Roman numerals
          1: numbers
          
          This type overrides the one used by its parent &lt;ol&gt; element, if any.
          
          Usage note: This attribute has been deprecated: use the CSS list-style-type property instead.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="value" type="xs:int">
      <xs:annotation>
        <xs:documentation>
          This integer attributes indicates the current ordinal value of the item in the list as defined by the &lt;ol&gt; element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The value attribute has no meaning for unordered lists (&lt;ul&gt;) or for menus (&lt;menu&gt;).
          
          Note: This attribute was deprecated in HTML4, but reintroduced in HTML5.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="li-with-parts">
    <xs:complexContent mixed="true">
      <xs:extension base="li-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-parts"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="li-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="li-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-responses"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="li-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="li-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="dl-base">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;dl&gt; Element (or HTML Description List Element) encloses a list of pairs of terms and descriptions. Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).
        
        Prior to HTML5, &lt;dl&gt; was known as a Definition List.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
  </xs:complexType>
  <xs:complexType name="dl-with-parts">
    <xs:complexContent>
      <xs:extension base="dl-base">
        <xs:choice maxOccurs="unbounded">
          <xs:element ref="dt"/>
          <xs:element name="dd" type="dd-with-parts"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="dl-with-responses">
    <xs:complexContent>
      <xs:extension base="dl-base">
        <xs:choice maxOccurs="unbounded">
          <xs:element ref="dt"/>
          <xs:element name="dd" type="dd-with-responses"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="dl-with-text">
    <xs:complexContent>
      <xs:extension base="dl-base">
        <xs:choice maxOccurs="unbounded">
          <xs:element ref="dt"/>
          <xs:element name="dd" type="dd-with-text"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="dt" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;dt&gt; element (or HTML Definition Term Element) identifies a term in a definition list. This element can occur only as a child element of a &lt;dl&gt;. It is usually followed by a &lt;dd&gt; element; however, multiple &lt;dt&gt; elements in a row indicate several terms that are all defined by the immediate next &lt;dd&gt; element.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType mixed="true" name="dd-base">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;dd&gt; Element (or HTML Description Element) indicates the description of a term in a description list (&lt;dl&gt;) element. This element can occur only as a child element of a definition list and it must follow a &lt;dt&gt; element.
      </xs:documentation>
    </xs:annotation>
  </xs:complexType>
  <xs:complexType mixed="true" name="dd-with-parts">
    <xs:complexContent mixed="true">
      <xs:extension base="dd-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-parts"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="dd-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="dd-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-responses"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="dd-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="dd-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="table-base">
    <xs:annotation>
      <xs:documentation>
        The HTML Table Element (&lt;table&gt;) represents data in two dimensions or more.
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute name="border" type="xs:int">
      <xs:annotation>
        <xs:documentation>
          This integer attribute defines, in pixels, the size of the frame surrounding the table. If set to 0, it implies that the frame attribute is set to void.
          Usage note: Do not use this attribute, as it has been deprecated: the &lt;table&gt; element should be styled using CSS. To give a similar effect than the border attribute, the CSS properties border, border-color, border-width and border-style should be used.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="cellpadding" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          This attribute defines the space between the content of a cell and the border, displayed or not, of it. If it is a pixel length, this pixel-sized space will be applied on all four sides; if it is a percentage length, the content will be centered and the total vertical space (top and bottom) will represent this percentage. The same is true for the total horizontal space (left and right).
          Usage note: Do not use this attribute, as it has been deprecated: the &lt;table&gt; element should be styled using CSS. To give a similar effect than the border attribute, use the CSS property border-collapse with the value collapse on the &lt;table&gt; element itself, and the property padding on the &lt;td&gt;.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="cellspacing" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          This attribute defines the size, in percentage or in pixels, of the space between two cells (both horizontally and vertically), between the top of the table and the cells of the first row, the left of the table and the first column, the right of the table and the last column and the bottom of the table and the last row.
          Usage note: Do not use this attribute, as it has been deprecated: the &lt;table&gt; element should be styled using CSS. To give a similar effect than the border attribute, use the CSS property border-collapse with the value collapse on the &lt;table&gt; element itself, and the property margin on the &lt;td&gt; element.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="TeXwidth">
      <xs:annotation>
        <xs:documentation>
          Width of the table in %
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:pattern value="[0-9]+\s*%"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="TeXtheme" type="xs:string"/>
    <xs:attribute name="align" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Deprecated attribute.
          
          This enumerated attribute indicates how the table must be aligned in regard of the containing document. It may have the following values:
          
          - left, meaning that the table is to be displayed to the left of the document;
          - center, meaning that the table is to be displayed centered in the document;
          - right, meaning that the table is to be displayed to the right of the document.
          
          Note: 
          Do not use this attribute, as it has been deprecated: the &lt;table&gt; element should be styled using CSS. To give a similar effect than the align attribute, the CSS properties "text-align" and "vertical-align" should be used.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="rules" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Deprecated attribute.
          
          This enumerated attribute defines where rules, i.e. lines, should appear in a table. It can have the following values:
          
          - none, which indicates the no rules will be displayed; it is the default value;
          - groups, which will make the rules to be displayed between row groups (defined by the &lt;thead&gt;, &lt;tbody&gt; and &lt;tfoot&gt; elements) and between column groups (defined by the &lt;col&gt; and &lt;colgroup&gt; elements) only;
          - rows, which will make the rules to be displayed between rows;
          - columns, which will make the rules to be displayed between columns;
          - all, which wil make the rules to be displayed between rows and columns.
          
          Note:
          The styling of the rules is browser-dependant and cannot be modified.
          Do not use this attribute, as it has been deprecated: the rules should be defined and styled using CSS. use the CSS property border on the adequate &lt;thead&gt;, &lt;tbody&gt;, &lt;tfoot&gt;, &lt;col&gt; or &lt;colgroup&gt; elements.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="table-with-parts">
    <xs:complexContent>
      <xs:extension base="table-base">
        <xs:sequence>
          <xs:element minOccurs="0" ref="caption"/>
          <xs:element minOccurs="0" ref="thead"/>
          <xs:element minOccurs="0" ref="tfoot"/>
          <xs:choice>
            <xs:element maxOccurs="unbounded" name="tbody" type="tbody-with-parts"/>
            <xs:element maxOccurs="unbounded" name="tr" type="tr-with-parts"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="table-with-responses">
    <xs:complexContent>
      <xs:extension base="table-base">
        <xs:sequence>
          <xs:element minOccurs="0" ref="caption"/>
          <xs:element minOccurs="0" ref="thead"/>
          <xs:element minOccurs="0" ref="tfoot"/>
          <xs:choice>
            <xs:element maxOccurs="unbounded" name="tbody" type="tbody-with-responses"/>
            <xs:element maxOccurs="unbounded" name="tr" type="tr-with-responses"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="table-with-text">
    <xs:complexContent>
      <xs:extension base="table-base">
        <xs:sequence>
          <xs:element minOccurs="0" ref="caption"/>
          <xs:element minOccurs="0" ref="thead"/>
          <xs:element minOccurs="0" ref="tfoot"/>
          <xs:choice>
            <xs:element maxOccurs="unbounded" name="tbody" type="tbody-with-text"/>
            <xs:element maxOccurs="unbounded" name="tr" type="tr-with-text"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="caption">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;caption&gt; Element (or HTML Table Caption Element) represents the title of a table. Though it is always the first descendant of a &lt;table&gt;, its styling, using CSS, may place it elsewhere, relative to the table.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="thead">
    <xs:annotation>
      <xs:documentation>
        The HTML Table Head Element (&lt;thead&gt;) defines a set of rows defining the head of the columns of the table.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="tr" type="tr-with-text"/>
      </xs:sequence>
      <xs:attribute name="align" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Deprecated attribute.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="tfoot">
    <xs:annotation>
      <xs:documentation>
        The HTML Table Foot Element (&lt;tfoot&gt;) defines a set of rows summarizing the columns of the table.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="tr" type="tr-with-text"/>
      </xs:sequence>
      <xs:attribute name="align" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Deprecated attribute.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="tbody-with-parts">
    <xs:sequence>
      <xs:choice>
        <xs:element maxOccurs="unbounded" name="tr" type="tr-with-parts"/>
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="align" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Deprecated attribute.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tbody-with-responses">
    <xs:sequence>
      <xs:choice>
        <xs:element maxOccurs="unbounded" name="tr" type="tr-with-responses"/>
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="align" type="xs:string"/>
  </xs:complexType>
  <xs:complexType name="tbody-with-text">
    <xs:sequence>
      <xs:choice>
        <xs:element maxOccurs="unbounded" name="tr" type="tr-with-text"/>
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="align" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Deprecated attribute.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tr-base">
    <xs:annotation>
      <xs:documentation>
        Table row
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute name="align" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          Deprecated attribute.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="tr-with-parts">
    <xs:complexContent>
      <xs:extension base="tr-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:element ref="th"/>
          <xs:element name="td" type="td-with-parts"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="tr-with-responses">
    <xs:complexContent>
      <xs:extension base="tr-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:element ref="th"/>
          <xs:element name="td" type="td-with-responses"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="tr-with-text">
    <xs:complexContent>
      <xs:extension base="tr-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:element ref="th"/>
          <xs:element name="td" type="td-with-text"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="html-align">
    <xs:restriction base="xs:string">
      <xs:enumeration value="left"/>
      <xs:enumeration value="center"/>
      <xs:enumeration value="right"/>
      <xs:enumeration value="justify"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType mixed="true" name="td-base">
    <xs:annotation>
      <xs:documentation>
        Table cell
      </xs:documentation>
    </xs:annotation>
    <xs:attributeGroup ref="coreattrs"/>
    <xs:attribute name="colspan" type="xs:int">
      <xs:annotation>
        <xs:documentation>
          This attribute contains a non-negative integer value that indicates on how many columns does the cell extend. Its default value is 1.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="rowspan" type="xs:int">
      <xs:annotation>
        <xs:documentation>
          This attribute contains a non-negative integer value that indicates on how many rows does the cell extend. Its default value is 1.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="align" type="html-align"/>
    <xs:attribute name="TeXwidth">
      <xs:annotation>
        <xs:documentation>
          Width of the cell in mm or another unit (cm, in, pt, pc)
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="perl">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:pattern value="\d*(\s+(mm|cm|in|pt|pc))?"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType mixed="true" name="td-with-parts">
    <xs:complexContent mixed="true">
      <xs:extension base="td-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-parts"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="td-with-responses">
    <xs:complexContent mixed="true">
      <xs:extension base="td-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-with-responses"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType mixed="true" name="td-with-text">
    <xs:complexContent mixed="true">
      <xs:extension base="td-base">
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="th">
    <xs:annotation>
      <xs:documentation>
        Table header cell
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="colspan" type="xs:int">
        <xs:annotation>
          <xs:documentation>
            This attribute contains a non-negative integer value that indicates on how many columns does the cell extend. Its default value is 1.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="rowspan" type="xs:int">
        <xs:annotation>
          <xs:documentation>
            This attribute contains a non-negative integer value that indicates on how many rows does the cell extend. Its default value is 1.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="align" type="html-align"/>
      <xs:attribute name="scope">
        <xs:annotation>
          <xs:documentation>
            defines the cells that the header defined in this &lt;th&gt; element relates to
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="row"/>
            <xs:enumeration value="col"/>
            <xs:enumeration value="rowgroup"/>
            <xs:enumeration value="colgroup"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TeXwidth">
        <xs:annotation>
          <xs:documentation>
            Width of the cell in mm or another unit (cm, in, pt, pc)
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="\d*(\s+(mm|cm|in|pt|pc))?"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="span">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;span&gt; element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. &lt;span&gt; is very much like a &lt;div&gt; element, but &lt;div&gt; is a block-level element whereas a &lt;span&gt; is an inline element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="inlines"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="a">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;a&gt; Element (or the HTML Anchor Element) defines a hyperlink, the named target destination for a hyperlink, or both.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="inlines"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="name" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            HTML 4 only, Obsolete since HTML5.
            
            This attribute is required in an anchor defining a target location within a page. A value for name is similar to a value for the id core attribute and should be an alphanumeric identifier unique to the document. Under the HTML 4.01 specification, id and name both can be used with the &lt;a&gt; element as long as they have identical values.
            
            Usage note: This attribute is obsolete in HTML5, use global attribute id instead.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="href" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            This was the single required attribute for anchors defining a hypertext source link, but is no longer required in HTML5. Omitting this attribute creates a placeholder link. The href attribute indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents.
            
            Note: You can use the special fragment "top" to create a link back to the top of the page; for example &lt;a href="#top"&gt;Return to top&lt;/a&gt;. This behavior is specified by HTML5.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="target" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            This attribute specifies where to display the linked resource. In HTML4, this is the name of, or a keyword for, a frame. In HTML5, it is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). The following keywords have special meanings:
            
            * _self: Load the response into the same HTML4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified.
            * _blank: Load the response into a new unnamed HTML4 window or HTML5 browsing context.
            * _parent: Load the response into the HTML4 frameset parent of the current frame or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as _self.
            * _top: In HTML4: Load the response into the full, original window, canceling all other frames. In HTML5: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self.
            
            Use this attribute only if the href attribute is present.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="title" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="rel" type="xs:NMTOKENS">
        <xs:annotation>
          <xs:documentation>
            For anchors containing the href attribute, this attribute specifies the relationship of the target object to the link object. The value is a comma-separated list of link types values. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the href attribute is present.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="accesskey">
        <xs:annotation>
          <xs:documentation>
            Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length fixed="true" value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="onclick" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Javascript event handler content attribute for the "click" event.
            
            Warning: event handler content attributes should be avoided. They make the markup bigger and less readable. Concerns of content/structure and behavior are not well-separated, making a bug harder to find. Furthermore, usage of event attributes almost always causes scripts to expose global functions on the Window object, polluting the global namespace.
            
            The EventTarget.addEventListener() function should be used instead to add a listener for the event.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="uriprint">
        <xs:annotation>
          <xs:documentation>
            Attribute specific to LON-CAPA.
            Display the href attribute when printing.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="on"/>
            <xs:enumeration value="uriprint"/>
            <xs:enumeration value="yes"/>
            <xs:enumeration value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="anchorprint">
        <xs:annotation>
          <xs:documentation>
            Attribute specific to LON-CAPA.
            Display the name attribute when printing.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="on"/>
            <xs:enumeration value="anchorprint"/>
            <xs:enumeration value="yes"/>
            <xs:enumeration value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="em" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML Emphasis Element (&lt;em&gt;) marks text that has stress emphasis. The &lt;em&gt; element can be nested, with each level of nesting indicating a greater degree of emphasis.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="strong" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML Strong Element (&lt;strong&gt;) gives text strong importance, and is typically displayed in bold.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="b" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;b&gt; Element represents a span of text stylistically different from normal text, without conveying any special importance or relevance. It is typically used for keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced. Another example of its use is to mark the lead sentence of each paragraph of an article.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="i" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;i&gt; Element represents a range of text that is set off from the normal text for some reason, for example, technical terms, foreign language phrases, or fictional character thoughts. It is typically displayed in italic type.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="sup" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML Superscript Element (&lt;sup&gt;) defines a span of text that should be displayed, for typographic reasons, higher, and often smaller, than the main span of text.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="sub" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML Subscript Element (&lt;sub&gt;) defines a span of text that should be displayed, for typographic reasons, lower, and often smaller, than the main span of text.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="pre">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;pre&gt; Element (or HTML Preformatted Text) represents preformatted text. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file. Whitespaces inside this element are displayed as typed.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="inlines"/>
      </xs:choice>
      <xs:attribute fixed="preserve" ref="xml:space"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="code" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;code&gt; Element represents a fragment of computer code. By default, it is displayed in the browser's default monospace font.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="kbd" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;kbd&gt; Element (or HTML Keyboard Input Element) represents user input and produces an inline element displayed in the browser's default monotype font.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="samp" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;samp&gt; element is an element intended to identify sample output from a computer program. It is usually displayed in the browser's default monotype font.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="cite" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;cite&gt; Element (or HTML Citation Element) represents a reference to a creative work. It must include the title of a work, the name of the author, or a URL reference, which may be in an abbreviated form according to the conventions used for the addition of citation metadata.
        
        Usage Notes:
        
        A creative work may include a book, a paper, an essay, a poem, a score, a song, a script, a film, a TV show, a game, a sculpture, a painting, a theater production, a play, an opera, a musical, an exhibition, a legal case report, a computer program, , a web site, a web page, a blog post or comment, a forum post or comment, a tweet, a written or oral statement, etc.
        Use the cite attribute on a &lt;blockquote&gt; or &lt;q&gt; element to reference an online resource for a source.
        
        
        Style note:
        
        To avoid the default italic style from being used for the &lt;cite&gt; element use the CSS font-style property.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="q">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;q&gt; Element (or HTML Quote Element) indicates that the enclosed text is a short inline quotation. This element is intended for short quotations that don't require paragraph breaks; for long quotations use &lt;blockquote&gt; element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="inlines"/>
      </xs:choice>
      <xs:attribute name="cite" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="tt" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
        
        The HTML Teletype Text Element (&lt;tt&gt;) produces an inline element displayed in the browser's default monotype font. This element was intended to style text as it would display on a fixed width display, such as a teletype. It probably is more common to display fixed width type using the &lt;code&gt; element.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="ins">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;ins&gt; Element (or HTML Inserted Text) HTML represents a range of text that has been added to a document.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="inlineBaseType">
          <xs:attribute name="cite" type="xs:anyURI"/>
          <xs:attribute name="datetime" type="xs:dateTime"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="del">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;del&gt; element (or HTML Deleted Text Element) represents a range of text that has been deleted from a document. This element is often (but need not be) rendered with strike-through text.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="inlineBaseType">
          <xs:attribute name="cite" type="xs:anyURI"/>
          <xs:attribute name="datetime" type="xs:dateTime"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="var" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML Variable Element (&lt;var&gt;) represents a variable in a mathematical expression or a programming context.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="small" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        The HTML Small Element (&lt;small&gt;) makes the text font size one size smaller (for example, from large to medium, or from small to x-small) down to the browser's minimum font size. In HTML5, this element is repurposed to represent side-comments and small print, including copyright and legal text, independent of its styled presentation.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="big" type="inlineBaseType">
    <xs:annotation>
      <xs:documentation>
        This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="br">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;br&gt; Element (or HTML Line Break Element) produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
    </xs:complexType>
  </xs:element>
  <xs:element name="hr">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;hr&gt; element represents a thematic break between paragraph-level elements (for example, a change of scene in a story, or a shift of topic with a section). In previous versions of HTML, it represented a horizontal rule. It may still be displayed as a horizontal rule in visual browsers, but is now defined in semantic terms, rather than presentational terms.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="coreattrs"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="address">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;address&gt; Element may be used by authors to supply contact information for its nearest &lt;article&gt; or &lt;body&gt; ancestor; in the latter case, it applies to the whole document.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="blockquote">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;blockquote&gt; Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (to change &lt;blockquote&gt; indent, use CSS margin property). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the &lt;cite&gt; element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="cite" type="xs:anyURI"/>
      <xs:attribute name="align">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="center"/>
            <xs:enumeration value="left"/>
            <xs:enumeration value="right"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="htmlLength">
    <xs:annotation>
      <xs:documentation>
        nn for pixels or nn% for percentage length
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[\-+]?(\d+|\d+(\.\d+)?%)"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="htmlLength-or-perl">
    <xs:union memberTypes="htmlLength perl"/>
  </xs:simpleType>
  <xs:element name="img">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;img&gt; Element (or HTML Image Element) represents an image of the document.
        
        Usage note:
        Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with vision impairments), or if the user chooses not to display images, or if the browser is unable to display the image because it is invalid or an unsupported type. In these cases, the browser may replace the image with the text defined in this element's alt attribute.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="src" type="xs:anyURI" use="required">
        <xs:annotation>
          <xs:documentation>
            Image URL.
            On browsers supporting srcset, src is ignored if this one is provided.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="alt" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            This attribute defines the alternative text describing the image. Users will see this displayed if the image URL is wrong, the image is not in one of the supported formats, or until the image is downloaded.
            
            Usage note: Omitting this attribute indicates that the image is a key part of the content, but no textual equivalent is available. Setting this attribute to the empty string indicates that this image is not a key part of the content; non-visual browsers may omit it from rendering.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="width" type="htmlLength-or-perl">
        <xs:annotation>
          <xs:documentation>
            The width of the image in pixels or percent.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="height" type="htmlLength-or-perl">
        <xs:annotation>
          <xs:documentation>
            The height of the image in pixels or percent.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TeXwidth">
        <xs:annotation>
          <xs:documentation>
            Allows you to set the width of the image, in mm or %, as it will be rendered into the LaTeX document used to print the problem.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[0-9]+(\.[0-9]+)?(\s*%)?"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TeXheight" type="decimal-or-perl">
        <xs:annotation>
          <xs:documentation>
            Allows you to set the height of the image, in mm, as it will be rendered into the LaTeX document used to print the problem.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="align">
        <xs:annotation>
          <xs:documentation>
            This attribute is deprecated since HTML 4.01 and obsolete since HTML5. Use the vertical-align CSS property instead.
            
            Specifies the alignment of the image relative to the enclosing text paragraph:
            - bottom: The image will be aligned so that its bottom will be at the baseline of the surrounding text.
            - middle: The image will be aligned so that its center-line will be at the baseline of the surrounding text.
            - top: The image will be aligned so that its top will be at the baseline of the surrounding text.
            - left: The image will be placed so that it is at the left of the surrounding text. The surrounding text will fill in the region to the right of the image.
            - right: The image will be placed so that it is at the right of the surrounding text. The surrounding text will fill in the region to the left of the image.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="bottom"/>
                <xs:enumeration value="middle"/>
                <xs:enumeration value="top"/>
                <xs:enumeration value="left"/>
                <xs:enumeration value="right"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TeXwrap">
        <xs:annotation>
          <xs:documentation>
            Allows you to select how the LaTeX document will attempt to wrap text around a horizontally aligned image.
            parbox: \newline and \parbox will be used to place the image. This method ensures that text will not be wrapped on top of the image, however very little text will appear next to the image itself.
            parpic: The picins package \parpic command will be used to place the image. This will wrap the remainder of the paragraph containing the picture around the image.
            If, however, there is insufficient text to fill the space to the left or right of the image, the next paragraph may be wrapped on top of the image. In addition, \parpic does not always honor the end of the page, causing the image to extend below the page footer.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:union memberTypes="perl">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="none"/>
                <xs:enumeration value="parbox"/>
                <xs:enumeration value="parpic"/>
                <xs:enumeration value="wrapfigure"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="no" name="encrypturl" type="yesno-or-perl"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="figure">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;figure&gt; Element represents self-contained content, frequently with a caption (&lt;figcaption&gt;), and is typically referenced as a single unit. While it is related to the main flow, its position is independent of the main flow. Usually this is an image, an illustration, a diagram, a code snippet, or a schema that is referenced in the main text, but that can be moved to another page or to an appendix without affecting the main flow.
        
        Usage note: A caption can be associated with the &lt;figure&gt; element by inserting a &lt;figcaption&gt; inside it (as the first or the last child).
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0">
        <xs:sequence>
          <xs:element ref="figcaption"/>
          <xs:choice maxOccurs="unbounded" minOccurs="0">
            <xs:group ref="text-only"/>
          </xs:choice>
        </xs:sequence>
        <xs:sequence>
          <xs:choice maxOccurs="unbounded">
            <xs:group ref="text-only"/>
          </xs:choice>
          <xs:element minOccurs="0" ref="figcaption"/>
        </xs:sequence>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="figcaption">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;figcaption&gt; Element represents a caption or a legend associated with a figure or an illustration described by the rest of the data of the &lt;figure&gt; element which is its immediate ancestor which means &lt;figcaption&gt; can be the first or last element inside a &lt;figure&gt; block. Also, the HTML Figcaption Element is optional; if not provided, then the parent figure element will have no caption.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="object">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;object&gt; Element (or HTML Embedded Object Element) represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="param"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="classid" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The URI of the object's implementation. It can be used together with, or in place of, the data attribute.
            Obsolete since HTML5.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="codebase" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The base path used to resolve relative URIs specified by classid, data, or archive. If not specified, the default is the base URI of the current document.
            Obsolete since HTML5.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="data" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The address of the resource as a valid URL. At least one of data and type must be defined.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="type" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The content type of the resource specified by data. At least one of data and type must be defined.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="codetype" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The content type of the data specified by classid.
            Obsolete since HTML5.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="archive">
        <xs:annotation>
          <xs:documentation>
            A space-separated list of URIs for archives of resources for the object.
            Obsolete since HTML5.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:list itemType="xs:anyURI"/>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="standby" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            A message that the browser can show while loading the object's implementation and data.
            Obsolete since HTML5.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="width" type="htmlLength-or-perl">
        <xs:annotation>
          <xs:documentation>
            The width of the display resource, in CSS pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="height" type="htmlLength-or-perl">
        <xs:annotation>
          <xs:documentation>
            The height of the displayed resource, in CSS pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="usemap" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            A hash-name reference to a &lt;map&gt; element; that is a '#' followed by the value of a name of a map element.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="name" type="xs:NMTOKEN">
        <xs:annotation>
          <xs:documentation>
            The name of valid browsing context (HTML5), or the name of the control (HTML 4).
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="param">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;param&gt; element is used to supply a named property value.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="id" type="xs:ID"/>
      <xs:attribute name="name">
        <xs:annotation>
          <xs:documentation>
            Name of the parameter.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="value">
        <xs:annotation>
          <xs:documentation>
            Specifies the value of the parameter.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="data" name="valuetype">
        <xs:annotation>
          <xs:documentation>
            Obsolete in HTML5.
            
            Specifies the type of the value attribute.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="data"/>
            <xs:enumeration value="ref"/>
            <xs:enumeration value="object"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="type" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Obsolete in HTML5.
            
            Only used if the valuetype is set to "ref". Specifies the MIME type of values found at the URI specified by value.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="embed">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;embed&gt; Element represents an integration point for an external application or interactive content (in other words, a plug-in).
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="id" type="xs:ID"/>
      <xs:attribute name="src" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The URL of the resource being embedded.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="type" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The MIME type to use to select the plug-in to instantiate.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="width" type="non-negative-int-or-perl">
        <xs:annotation>
          <xs:documentation>
            The displayed width of the resource, in CSS pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="height" type="non-negative-int-or-perl">
        <xs:annotation>
          <xs:documentation>
            The displayed height of the resource, in CSS pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="applet">
    <xs:annotation>
      <xs:documentation>
        This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="param"/>
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:ID"/>
      <xs:attribute name="codebase" type="xs:anyURI"/>
      <xs:attribute name="archive" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Comma-separated list of URIs for archives containing classes and other resources that will be "preloaded".
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="code"/>
      <xs:attribute name="object"/>
      <xs:attribute name="alt" type="xs:string"/>
      <xs:attribute name="name" type="xs:NMTOKEN"/>
      <xs:attribute name="width" type="non-negative-int-or-perl" use="required"/>
      <xs:attribute name="height" type="non-negative-int-or-perl" use="required"/>
      <xs:attribute name="align">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="top"/>
            <xs:enumeration value="middle"/>
            <xs:enumeration value="bottom"/>
            <xs:enumeration value="left"/>
            <xs:enumeration value="right"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="hspace" type="xs:nonNegativeInteger"/>
      <xs:attribute name="vspace" type="xs:nonNegativeInteger"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="video">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;video&gt; element is used to embed video content. It may contain several video sources, represented using the src attribute or the &lt;source&gt; element; the browser will choose the most suitable one.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="source"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="src" type="xs:anyURI"/>
      <xs:attribute name="width" type="non-negative-int-or-perl"/>
      <xs:attribute name="height" type="non-negative-int-or-perl"/>
      <xs:attribute name="autoplay">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="autoplay"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="controls">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="controls"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="loop">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="loop"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="source">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;source&gt; element is used to specify multiple media resources for &lt;picture&gt;, &lt;audio&gt; and &lt;video&gt; elements. It is an empty element. It is commonly used to serve the same media in multiple formats supported by different browsers.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="src" type="xs:anyURI" use="required"/>
      <xs:attribute name="type" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="audio">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;audio&gt; element is used to embed sound content in documents. It may contain several audio sources, represented using the src attribute or the &lt;source&gt; element; the browser will choose the most suitable one.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:element ref="source"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="src" type="xs:anyURI"/>
      <xs:attribute name="autoplay">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="autoplay"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="controls">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="controls"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="loop">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="loop"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:element name="map">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;map&gt; element is used with &lt;area&gt; elements to define an image map (a clickable link area).
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice>
        <xs:choice maxOccurs="unbounded">
          <xs:group ref="blocks-with-text"/>
        </xs:choice>
        <xs:element maxOccurs="unbounded" ref="area"/>
      </xs:choice>
      <xs:attribute name="id" type="xs:ID" use="required"/>
      <xs:attribute name="class" type="xs:NMTOKENS"/>
      <xs:attribute name="style" type="xs:string"/>
      <xs:attribute name="title" type="xs:string"/>
      <xs:attribute name="name" type="xs:NMTOKEN"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="area">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;area&gt; element defines a hot-spot region on an image, and optionally associates it with a hypertext link. This element is used only within a &lt;map&gt; element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute default="rect" name="shape">
        <xs:annotation>
          <xs:documentation>
            The shape of the associated hot spot. The specifications for HTML 5 and HTML 4 define the values rect, which defines a rectangular region; circle, which defines a circular region; poly, which defines a polygon; and default, which indicates the entire region beyond any defined shapes.
            Many browsers, notably Internet Explorer 4 and higher, support circ, polygon, and rectangle as valid values for shape; these values are *not standard*.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="rect"/>
            <xs:enumeration value="circle"/>
            <xs:enumeration value="poly"/>
            <xs:enumeration value="default"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="coords">
        <xs:annotation>
          <xs:documentation>
            A set of values specifying the coordinates of the hot-spot region. The number and meaning of the values depend upon the value specified for the shape attribute. For a rect or rectangle shape, the coords value is two x,y pairs: left, top, right, and bottom. For a circle shape, the value is x,y,r where x,y is a pair specifying the center of the circle and r is a value for the radius. For a poly or polygon&lt; shape, the value is a set of x,y pairs for each point in the polygon: x1,y1,x2,y2,x3,y3, and so on. In HTML4, the values are numbers of pixels or percentages, if a percent sign (%) is appended; in HTML5, the values are numbers of CSS pixels.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="[\-+]?(\d+|\d+(\.\d+)?%)(,\s*[\-+]?(\d+|\d+(\.\d+)?%))*"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="href" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The hyperlink target for the area. Its value is a valid URL. In HTML4, either this attribute or the nohref attribute must be present in the element. In HTML5, this attribute may be omitted; if so, the area element does not represent a hyperlink.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="nohref">
        <xs:annotation>
          <xs:documentation>
            Indicates that no hyperlink exists for the associated area. Either this attribute or the href attribute must be present in the element.
            
            Usage note: This attribute is obsolete in HTML5, instead omitting the href attribute is sufficient.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="nohref"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="alt" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>
            A text string alternative to display on browsers that do not display images. The text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text. In HTML4, this attribute is required, but may be the empty string (""). In HTML5, this attribute is required only if the href attribute is used.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="canvas">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;canvas&gt; Element can be used to draw graphics via scripting (usually JavaScript). For example, it can be used to draw graphs, make photo compositions or even perform animations. You may (and should) provide alternate content inside the &lt;canvas&gt; block. That content will be rendered both on older browsers that don't support canvas and in browsers with JavaScript disabled.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="blocks-with-text"/>
        <xs:group ref="inlines"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute default="300" name="width" type="htmlLength-or-perl">
        <xs:annotation>
          <xs:documentation>
            The width of the coordinate space in CSS pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="150" name="height" type="htmlLength-or-perl">
        <xs:annotation>
          <xs:documentation>
            The height of the coordinate space in CSS pixels.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:element name="form">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;form&gt; element represents a document section that contains interactive controls to submit information to a web server.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="blocks-with-text"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="action" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>
            The URI of a program that processes the form information.
            
            In HTML5, the action attribute is no longer required.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute default="get" name="method">
        <xs:annotation>
          <xs:documentation>
            The HTTP method that the browser uses to submit the form. Possible values are:
            
            - post: Corresponds to the HTTP POST method ; form data are included in the body of the form and sent to the server.
            
            - get: Corresponds to the HTTP GET method; form data are appended to the action attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="get"/>
            <xs:enumeration value="post"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute default="application/x-www-form-urlencoded" name="enctype" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            When the value of the method attribute is post, enctype is the MIME type of content that is used to submit the form to the server. Possible values are:
            
            - application/x-www-form-urlencoded: The default value if the attribute is not specified.
            - multipart/form-data: The value used for an &lt;input&gt; element with the type attribute set to "file".
            - text/plain (HTML5)
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="accept-charset" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string "UNKNOWN", indicates the same encoding as that of the document containing the form element.
            
            In previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="name" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            The name of the form. In HTML 4, its use is deprecated (id should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="accept" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            A comma-separated list of content types that the server accepts.
            
            Usage note: This attribute has been removed in HTML5 and should no longer be used. Instead, use the accept attribute of the specific &lt;input&gt; element.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="onsubmit" type="xs:string"/>
      <xs:attribute name="onreset" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="label">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;label&gt; Element represents a caption for an item in a user interface. It can be associated with a control either by placing the control element inside the label element, or by using the for attribute. Such a control is called the labeled control of the label element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="inlineBaseType">
          <xs:attribute name="for" type="xs:IDREF">
            <xs:annotation>
              <xs:documentation>
                The ID of a labelable form-related element in the same document as the label element. The first such element in the document with an ID matching the value of the for attribute is the labeled control for this label element. 
              </xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="accesskey">
            <xs:annotation>
              <xs:documentation>
                A shortcut key to access this element from the keyboard.
              </xs:documentation>
            </xs:annotation>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:length fixed="true" value="1"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="form" type="xs:IDREF">
            <xs:annotation>
              <xs:documentation>
                The form element that the label element is associated with (its form owner). If specified, the value of the attribute must be the ID of a &lt;form&gt; element in the same document. This attribute enables you to place label elements anywhere within a document, not just as descendants of their form elements.
              </xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="onfocus" type="xs:string"/>
          <xs:attribute name="onblur" type="xs:string"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="InputType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="text"/>
      <xs:enumeration value="password"/>
      <xs:enumeration value="checkbox"/>
      <xs:enumeration value="radio"/>
      <xs:enumeration value="submit"/>
      <xs:enumeration value="reset"/>
      <xs:enumeration value="file"/>
      <xs:enumeration value="hidden"/>
      <xs:enumeration value="image"/>
      <xs:enumeration value="button"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="input">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;input&gt; element is used to create interactive controls for web-based forms in order to accept data from user. 
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute default="text" name="type" type="InputType"/>
      <xs:attribute name="name">
        <xs:annotation>
          <xs:documentation>
            the name attribute is required for all but submit &amp; reset
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="value"/>
      <xs:attribute name="checked">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="checked"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="disabled">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="disabled"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="readonly">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="readonly"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="size"/>
      <xs:attribute name="maxlength" type="xs:nonNegativeInteger"/>
      <xs:attribute name="src" type="xs:anyURI"/>
      <xs:attribute name="alt"/>
      <xs:attribute name="usemap" type="xs:anyURI"/>
      <xs:attribute name="onselect" type="xs:string"/>
      <xs:attribute name="onchange" type="xs:string"/>
      <xs:attribute name="accept" type="xs:string"/>
      <xs:attribute name="onclick" type="xs:string">
        <xs:annotation>
          <xs:documentation>
            Javascript event handler content attribute for the "click" event.
            
            Warning: event handler content attributes should be avoided. They make the markup bigger and less readable. Concerns of content/structure and behavior are not well-separated, making a bug harder to find. Furthermore, usage of event attributes almost always causes scripts to expose global functions on the Window object, polluting the global namespace.
            
            The EventTarget.addEventListener() function should be used instead to add a listener for the event.
          </xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="select">
    <xs:annotation>
      <xs:documentation>
        The HTML select (&lt;select&gt;) element represents a control that presents a menu of options. The options within the menu are represented by &lt;option&gt; elements, which can be grouped by &lt;optgroup&gt; elements. Options can be pre-selected for the user.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element ref="optgroup"/>
        <xs:element ref="option"/>
      </xs:choice>
      <xs:attribute name="name"/>
      <xs:attribute name="size" type="xs:nonNegativeInteger"/>
      <xs:attribute name="multiple">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="multiple"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="disabled">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="disabled"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="tabindex" type="xs:nonNegativeInteger"/>
      <xs:attribute name="onfocus" type="xs:string"/>
      <xs:attribute name="onblur" type="xs:string"/>
      <xs:attribute name="onchange" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="optgroup">
    <xs:annotation>
      <xs:documentation>
        In a Web form, the HTML &lt;optgroup&gt; element creates a grouping of options within a &lt;select&gt; element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="option"/>
      </xs:sequence>
      <xs:attribute name="disabled">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="disabled"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="label" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="option">
    <xs:annotation>
      <xs:documentation>
        In a Web form, the HTML &lt;option&gt; element is used to create a control representing an item within a &lt;select&gt;, an &lt;optgroup&gt; or a &lt;datalist&gt; HTML5 element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attribute name="selected">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="selected"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="disabled">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="disabled"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="label" type="xs:string"/>
      <xs:attribute name="value"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="textarea">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;textarea&gt; element represents a multi-line plain-text editing control.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attribute name="name"/>
      <xs:attribute name="rows" type="xs:nonNegativeInteger" use="required"/>
      <xs:attribute name="cols" type="xs:nonNegativeInteger" use="required"/>
      <xs:attribute name="disabled">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="disabled"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="readonly">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="readonly"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="onselect" type="xs:string"/>
      <xs:attribute name="onchange" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="fieldset">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;fieldset&gt; element is used to group several controls as well as labels (&lt;label&gt;) within a web form.
        
        Only one legend element should occur in the content, and if present should only be preceded by whitespace.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element ref="legend"/>
        <xs:choice maxOccurs="unbounded" minOccurs="0">
          <xs:group ref="text-only"/>
        </xs:choice>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="legend">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;legend&gt; Element (or HTML Legend Field Element) represents a caption for the content of its parent &lt;fieldset&gt;.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="inlineBaseType">
          <xs:attribute name="accesskey">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:length fixed="true" value="1"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="button">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;button&gt; Element represents a clickable button.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="text-only"/>
      </xs:choice>
      <xs:attribute name="name"/>
      <xs:attribute name="value"/>
      <xs:attribute default="submit" name="type">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="button"/>
            <xs:enumeration value="submit"/>
            <xs:enumeration value="reset"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="disabled">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="disabled"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
  <xs:element name="iframe">
    <xs:annotation>
      <xs:documentation>
        The HTML &lt;iframe&gt; Element (or HTML inline frame element) represents a nested browsing context, effectively embedding another HTML page into the current page.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice maxOccurs="unbounded" minOccurs="0">
        <xs:group ref="blocks-with-text"/>
      </xs:choice>
      <xs:attributeGroup ref="coreattrs"/>
      <xs:attribute name="name" type="xs:NMTOKEN"/>
      <xs:attribute name="src" type="xs:anyURI"/>
      <xs:attribute default="1" name="frameborder">
        <xs:annotation>
          <xs:documentation>
            Warning: HTML 4 only
            
            The value 1 (the default) tells the browser to draw a border between this frame and every other frame.
            The value 0 tells the browser not to draw a border between this frame and other frames.
          </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="1"/>
            <xs:enumeration value="0"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="height" type="htmlLength"/>
      <xs:attribute name="width" type="htmlLength"/>
      <xs:attribute name="allowfullscreen">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="allowfullscreen"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  
</xs:schema>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>