Online Flora XML Schema 20081128

From Hiscom
Jump to: navigation, search


  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <!-- edited by Aaron Wilton (Allan Herbarium), 28 Nov 2008  -->
  3. <!--Should consider purpose of schema.  It may be worth breaking into smaller schema that include major types (e.g., identification) - 
  4.   that can be used as templates that are included schema for a specific purpose.-->
  5. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  6.   <xs:complexType name="taxonType">
  7.     <xs:sequence>
  8.       <xs:element name="seq" type="xs:string" minOccurs="0"/>
  9.       <xs:element name="Nomenclature">
  10.         <xs:annotation>
  11.           <xs:documentation>Requires discussion!</xs:documentation>
  12.         </xs:annotation>
  13.         <xs:complexType>
  14.           <xs:sequence>
  15.             <xs:element name="Parent" type="xs:string" minOccurs="0"/>
  16.             <xs:element name="Rank" type="xs:string"/>
  17.             <xs:element name="TaxonName" type="TaxonNameType"/>
  18.             <xs:element name="Synonyms" minOccurs="0">
  19.               <xs:annotation>
  20.                 <xs:documentation>Added as suggestion - will need to be refined.</xs:documentation>
  21.               </xs:annotation>
  22.               <xs:complexType>
  23.                 <xs:sequence>
  24.                   <xs:element name="Synonym" type="TaxonNameType" maxOccurs="unbounded"/>
  25.                 </xs:sequence>
  26.               </xs:complexType>
  27.             </xs:element>
  28.           </xs:sequence>
  29.         </xs:complexType>
  30.       </xs:element>
  31.       <xs:element name="Title" type="ParagraphType" minOccurs="0"/>
  32.       <xs:element name="Contributor" type="ParagraphType" minOccurs="0"/>
  33.       <xs:element name="TaxonDescription">
  34.         <xs:complexType>
  35.           <xs:choice minOccurs="0" maxOccurs="unbounded">
  36.             <xs:element name="Description">
  37.               <xs:complexType>
  38.                 <xs:sequence>
  39.                   <xs:element name="DescriptionFull" type="ParagraphsType"/>
  40.                   <xs:element name="DescriptionElement">
  41.                     <xs:complexType>
  42.                       <xs:complexContent>
  43.                         <xs:extension base="ParagraphType">
  44.                           <xs:attribute name="type" use="required">
  45.                             <xs:simpleType>
  46.                               <xs:restriction base="xs:string">
  47.                                 <xs:enumeration value="bark"/>
  48.                                 <xs:enumeration value="flowers"/>
  49.                               </xs:restriction>
  50.                             </xs:simpleType>
  51.                           </xs:attribute>
  52.                         </xs:extension>
  53.                       </xs:complexContent>
  54.                     </xs:complexType>
  55.                   </xs:element>
  56.                   <xs:element name="Diagnosis">
  57.                     <xs:complexType>
  58.                       <xs:complexContent>
  59.                         <xs:extension base="ParagraphsType">
  60.                           <xs:attribute name="language"/>
  61.                         </xs:extension>
  62.                       </xs:complexContent>
  63.                     </xs:complexType>
  64.                   </xs:element>
  65.                 </xs:sequence>
  66.               </xs:complexType>
  67.             </xs:element>
  68.             <xs:element name="Habitat" type="ParagraphType"/>
  69.             <xs:element name="Distribution">
  70.               <xs:complexType>
  71.                 <xs:sequence>
  72.                   <xs:element name="DistributionRegional" type="ParagraphType"/>
  73.                   <xs:element name="DistributionNoTaxa" type="xs:string"/>
  74.                 </xs:sequence>
  75.               </xs:complexType>
  76.             </xs:element>
  77.             <xs:element name="Note" type="ParagraphType"/>
  78.             <xs:element name="Identification">
  79.               <xs:complexType>
  80.                 <xs:sequence>
  81.                   <xs:element name="KeyTitle" type="ParagraphType" minOccurs="0"/>
  82.                   <xs:element name="KeyContributor" type="ParagraphType" minOccurs="0"/>
  83.                   <xs:element name="KeyFrontNote" type="ParagraphsType" minOccurs="0"/>
  84.                   <xs:element name="Key" type="KeyType"/>
  85.                   <xs:element name="KeyEndNote" type="ParagraphsType" minOccurs="0"/>
  86.                 </xs:sequence>
  87.               </xs:complexType>
  88.             </xs:element>
  89.             <xs:element name="Chromosome" type="ParagraphType"/>
  90.             <xs:element name="Conservation">
  91.               <xs:annotation>
  92.                 <xs:documentation>This requires more work... - what geographic region 
  93.                                   - is this restricted to the geography scope 
  94.                                   - what if want to describe in other areas</xs:documentation>
  95.               </xs:annotation>
  96.               <xs:complexType>
  97.                 <xs:sequence>
  98.                   <xs:element name="StatusDescription">
  99.                     <xs:simpleType>
  100.                       <xs:restriction base="xs:string">
  101.                         <xs:enumeration value="Very rare"/>
  102.                         <xs:enumeration value="other descriptors"/>
  103.                       </xs:restriction>
  104.                     </xs:simpleType>
  105.                   </xs:element>
  106.                   <xs:element name="StatusCode">
  107.                     <xs:simpleType>
  108.                       <xs:restriction base="xs:string">
  109.                         <xs:enumeration value="3W"/>
  110.                         <xs:enumeration value="Other codes"/>
  111.                       </xs:restriction>
  112.                     </xs:simpleType>
  113.                   </xs:element>
  114.                   <xs:element name="ConservationLegislative">
  115.                     <xs:simpleType>
  116.                       <xs:restriction base="xs:string">
  117.                         <xs:enumeration value="EPBC Act"/>
  118.                         <xs:enumeration value="other acts"/>
  119.                       </xs:restriction>
  120.                     </xs:simpleType>
  121.                   </xs:element>
  122.                 </xs:sequence>
  123.               </xs:complexType>
  124.             </xs:element>
  125.             <xs:element name="Images">
  126.               <xs:complexType>
  127.                 <xs:sequence>
  128.                   <xs:element name="Image" maxOccurs="unbounded">
  129.                     <xs:complexType>
  130.                       <xs:sequence>
  131.                         <xs:element name="ImageIdentifier" type="xs:string"/>
  132.                         <xs:element name="ImageUrl" type="xs:string"/>
  133.                         <xs:element name="ImageCaption" type="ParagraphsType"/>
  134.                       </xs:sequence>
  135.                     </xs:complexType>
  136.                   </xs:element>
  137.                 </xs:sequence>
  138.               </xs:complexType>
  139.             </xs:element>
  140.             <xs:element name="Licence" type="ParagraphType"/>
  141.             <xs:element name="Phenology" type="ParagraphType">
  142.               <xs:annotation>
  143.                 <xs:documentation>Issue:  Phenology/Lifestage and gender need to qaulify all descriptive elements 
  144.                                   - perhaps at the TaxonDescription level</xs:documentation>
  145.               </xs:annotation>
  146.             </xs:element>
  147.             <xs:element name="ScopeGeography" type="ParagraphType"/>
  148.             <xs:element name="Source" type="ParagraphType"/>
  149.             <xs:element name="SourceDate" type="xs:string"/>
  150.             <xs:element name="Specimens">
  151.               <xs:complexType>
  152.                 <xs:choice>
  153.                   <xs:element name="SpecimenText" type="ParagraphType"/>
  154.                   <xs:element name="SpecimenList">
  155.                     <xs:complexType>
  156.                       <xs:sequence>
  157.                         <xs:element name="Specimen" maxOccurs="unbounded">
  158.                           <xs:complexType>
  159.                             <xs:simpleContent>
  160.                               <xs:extension base="xs:string">
  161.                                 <xs:attribute name="specimenID"/>
  162.                               </xs:extension>
  163.                             </xs:simpleContent>
  164.                           </xs:complexType>
  165.                         </xs:element>
  166.                       </xs:sequence>
  167.                     </xs:complexType>
  168.                   </xs:element>
  169.                 </xs:choice>
  170.               </xs:complexType>
  171.             </xs:element>
  172.             <xs:element name="WeedStatus">
  173.               <xs:complexType>
  174.                 <xs:sequence>
  175.                   <xs:element name="WeedStatusText" type="ParagraphType"/>
  176.                   <xs:element name="WeedLegislativeCode">
  177.                     <xs:simpleType>
  178.                       <xs:restriction base="xs:string">
  179.                         <xs:enumeration value="5H"/>
  180.                         <xs:enumeration value="Other codes"/>
  181.                       </xs:restriction>
  182.                     </xs:simpleType>
  183.                   </xs:element>
  184.                   <xs:element name="WeedLegislative" type="xs:string"/>
  185.                 </xs:sequence>
  186.               </xs:complexType>
  187.             </xs:element>
  188.           </xs:choice>
  189.         </xs:complexType>
  190.       </xs:element>
  191.       <xs:element name="Taxon" type="taxonType" minOccurs="0"/>
  192.     </xs:sequence>
  193.     <xs:attribute name="conceptID">
  194.       <xs:annotation>
  195.         <xs:documentation>Id for concept held externally</xs:documentation>
  196.       </xs:annotation>
  197.     </xs:attribute>
  198.     <xs:attribute name="id">
  199.       <xs:annotation>
  200.         <xs:documentation>The id that has been assigned to this taxon record</xs:documentation>
  201.       </xs:annotation>
  202.     </xs:attribute>
  203.   </xs:complexType>
  204.   <xs:complexType name="ParagraphType" mixed="1">
  205.     <xs:annotation>
  206.       <xs:documentation>Would consider adding literature citation and specimen citation elements to the choice to allow linkages.  
  207.               May be worth adding a generalised linkage element that allows connecting to other resources (e.g., to figures etc)</xs:documentation>
  208.     </xs:annotation>
  209.     <xs:choice minOccurs="0" maxOccurs="unbounded">
  210.       <xs:element name="Font">
  211.         <xs:annotation>
  212.           <xs:documentation>allows to handle various font combinations - super and sub script useful (e.g., chromosome valancy).  
  213.                       Need to ensure that there are xslts with font template that can be used as a standard include higher level xslts  - e.g., one to create html etc</xs:documentation>
  214.         </xs:annotation>
  215.         <xs:complexType>
  216.           <xs:simpleContent>
  217.             <xs:extension base="xs:string">
  218.               <xs:attribute name="italic" type="xs:boolean" use="optional"/>
  219.               <xs:attribute name="bold" type="xs:boolean" use="optional"/>
  220.               <xs:attribute name="underline" type="xs:boolean" use="optional"/>
  221.               <xs:attribute name="super" type="xs:boolean" use="optional"/>
  222.               <xs:attribute name="sub" type="xs:boolean" use="optional"/>
  223.               <xs:attribute name="size" type="xs:string" use="optional"/>
  224.             </xs:extension>
  225.           </xs:simpleContent>
  226.         </xs:complexType>
  227.       </xs:element>
  228.       <xs:element name="Name" type="TaxonNameType"/>
  229.     </xs:choice>
  230.     <xs:attribute name="sourceID">
  231.       <xs:annotation>
  232.         <xs:documentation>ID for external source which provides the information, or from which the data was derived</xs:documentation>
  233.       </xs:annotation>
  234.     </xs:attribute>
  235.     <xs:attribute name="id" type="xs:string" use="optional"/>
  236.   </xs:complexType>
  237.   <xs:complexType name="ParagraphsType">
  238.     <xs:sequence maxOccurs="unbounded">
  239.       <xs:element name="Paragraph" type="ParagraphType"/>
  240.       <xs:element name="Table">
  241.         <xs:annotation>
  242.           <xs:documentation>Consider including table - this is start only - may want some of table header etc</xs:documentation>
  243.         </xs:annotation>
  244.         <xs:complexType>
  245.           <xs:sequence>
  246.             <xs:element name="tr" maxOccurs="unbounded">
  247.               <xs:complexType>
  248.                 <xs:choice maxOccurs="unbounded">
  249.                   <xs:element name="td"/>
  250.                   <xs:element name="th"/>
  251.                 </xs:choice>
  252.               </xs:complexType>
  253.             </xs:element>
  254.           </xs:sequence>
  255.         </xs:complexType>
  256.       </xs:element>
  257.     </xs:sequence>
  258.     <xs:attribute name="id" type="xs:string" use="optional"/>
  259.   </xs:complexType>
  260.   <xs:complexType name="TaxonNameType">
  261.     <xs:choice maxOccurs="unbounded">
  262.       <xs:element name="Name" type="xs:string"/>
  263.       <xs:element name="Author" type="xs:string"/>
  264.       <xs:element name="Rank" type="xs:string"/>
  265.       <xs:element name="Protologue"/>
  266.     </xs:choice>
  267.     <xs:attribute name="nameFull">
  268.       <xs:annotation>
  269.         <xs:documentation>added as attribute but may be better as element, however it not intended for display.</xs:documentation>
  270.       </xs:annotation>
  271.     </xs:attribute>
  272.     <xs:attribute name="taxonId"/>
  273.     <xs:attribute name="nameId"/>
  274.   </xs:complexType>
  275.   <xs:complexType name="KeyRowsType">
  276.     <xs:sequence>
  277.       <xs:element name="KeyRowsNumber">
  278.         <xs:annotation>
  279.           <xs:documentation>Maybe superfluous - always use KeyRowNumber instead?</xs:documentation>
  280.         </xs:annotation>
  281.       </xs:element>
  282.       <xs:element name="KeyRow" maxOccurs="unbounded">
  283.         <xs:complexType>
  284.           <xs:sequence>
  285.             <xs:element name="KeyRowNumber" type="xs:string" minOccurs="0"/>
  286.             <xs:element name="KeyRowDescription">
  287.               <xs:annotation>
  288.                 <xs:documentation>ParagraphType?  Better name!</xs:documentation>
  289.               </xs:annotation>
  290.             </xs:element>
  291.             <xs:element name="KeyRowResult">
  292.               <xs:complexType>
  293.                 <xs:complexContent>
  294.                   <xs:extension base="ParagraphType">
  295.                     <xs:attribute name="resultID" type="xs:string">
  296.                       <xs:annotation>
  297.                         <xs:documentation>identifier for the result this may be another part of the same key, another key, a taxon entry</xs:documentation>
  298.                       </xs:annotation>
  299.                     </xs:attribute>
  300.                     <xs:attribute name="resultType">
  301.                       <xs:simpleType>
  302.                         <xs:restriction base="xs:string">
  303.                           <xs:enumeration value="KeyRow"/>
  304.                           <xs:enumeration value="Taxon"/>
  305.                           <xs:enumeration value="Key"/>
  306.                         </xs:restriction>
  307.                       </xs:simpleType>
  308.                     </xs:attribute>
  309.                   </xs:extension>
  310.                 </xs:complexContent>
  311.               </xs:complexType>
  312.             </xs:element>
  313.             <xs:element name="KeyRowNote" type="ParagraphType" minOccurs="0"/>
  314.             <xs:element name="NestedRows" type="KeyRowsType" minOccurs="0"/>
  315.             <xs:element name="NestedKey" type="KeyType" minOccurs="0"/>
  316.           </xs:sequence>
  317.         </xs:complexType>
  318.       </xs:element>
  319.     </xs:sequence>
  320.   </xs:complexType>
  321.   <xs:complexType name="KeyType">
  322.     <xs:sequence>
  323.       <xs:element name="KeyRows" type="KeyRowsType" maxOccurs="unbounded">
  324.         <xs:annotation>
  325.           <xs:documentation>Appropriate name?</xs:documentation>
  326.         </xs:annotation>
  327.       </xs:element>
  328.     </xs:sequence>
  329.   </xs:complexType>
  330. </xs:schema>