<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================= -->
<!--                    HEADER                                     -->
<!-- ============================================================= -->
<!-- ============================================================= -->
<!--  MODULE:    DITA Hazard Statement Domain                  -->
<!--  VERSION:   1.2                                             -->
<!--  DATE:      November 2009                                     -->
<!--                                                               -->
<!-- ============================================================= -->

<!-- ============================================================= -->
<!-- SYSTEM:     Darwin Information Typing Architecture (DITA)     -->
<!--                                                               -->
<!-- PURPOSE:    W3C XML Schema to describe Hazard domains    -->
<!--                                                               -->
<!-- ORIGINAL CREATION DATE:                                       -->
<!--             September  2009                                        -->
<!--                                                               -->
<!--             (C) Copyright OASIS-Open.org 2009                -->
<!--             All Rights Reserved.                              -->
<!-- ============================================================= -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  
  <xs:annotation>
    <xs:appinfo>
      <dita:domainsModule xmlns:dita="http://dita.oasis-open.org/architecture/2005/">(topic hazard-d)</dita:domainsModule>
    </xs:appinfo>
    <xs:documentation>
      
    </xs:documentation>
  </xs:annotation>
    
    <xs:group name="hazard-d-note">
        <xs:choice>
            <xs:element ref="hazardstatement"/>
        </xs:choice>
    </xs:group>  

   <xs:group name="hazardstatement">
      <xs:sequence>
         <xs:choice>
            <xs:element ref="hazardstatement"/>
         </xs:choice>
      </xs:sequence>
   </xs:group>

   <xs:group name="messagepanel">
      <xs:sequence>
         <xs:choice>
            <xs:element ref="messagepanel"/>
         </xs:choice>
      </xs:sequence>
   </xs:group>

   <xs:group name="hazardsymbol">
      <xs:sequence>
         <xs:choice>
            <xs:element ref="hazardsymbol"/>
         </xs:choice>
      </xs:sequence>
   </xs:group>

   <xs:group name="typeofhazard">
      <xs:sequence>
         <xs:choice>
            <xs:element ref="typeofhazard"/>
         </xs:choice>
      </xs:sequence>
   </xs:group>

   <xs:group name="consequence">
      <xs:sequence>
         <xs:choice>
            <xs:element ref="consequence"/>
         </xs:choice>
      </xs:sequence>
   </xs:group>

   <xs:group name="howtoavoid">
      <xs:sequence>
         <xs:choice>
            <xs:element ref="howtoavoid"/>
         </xs:choice>
      </xs:sequence>
   </xs:group>
    
    
<!--  
      Any content model that includes the hazard.cnt group must also set  mixed="true" 
   >-->
  <xs:group name="hazard.cnt">
    <xs:sequence>
      <xs:choice>
        <xs:group ref="basic.ph"/>
        <xs:group ref="sl"/>
        <xs:group ref="simpletable"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:element name="hazardstatement">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="hazardstatement.class">
          <xs:attribute ref="class" default="+ topic/note hazard-d/hazardstatement "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="hazardstatement.class">
    <xs:sequence>
      <xs:group ref="hazardstatement.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="hazardstatement.attributes"/>
  </xs:complexType>
  
  <xs:group name="hazardstatement.content">
    <xs:sequence>
      <xs:sequence>
      <xs:group ref="messagepanel" maxOccurs="unbounded"/>
      <xs:group ref="hazardsymbol" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="hazardstatement.attributes">
    <xs:attribute name="type" type="type-note-atts.class"/>
    <xs:attribute name="spectitle" type="xs:string"/>
    <xs:attribute name="othertype" type="xs:string"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="univ-atts"/>
    <xs:attributeGroup ref="global-atts"/>
  </xs:attributeGroup>
  
  
  <xs:element name="messagepanel" >
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="messagepanel.class">
          <xs:attribute ref="class" default="+ topic/ul hazard-d/messagepanel "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
   <xs:complexType name="messagepanel.class">
    <xs:sequence>
      <xs:group ref="messagepanel.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="messagepanel.attributes"/>
   </xs:complexType>
  
  <xs:group name="messagepanel.content">
    <xs:sequence>
      <xs:sequence>
      <xs:group ref="typeofhazard" />
      <xs:group ref="consequence" maxOccurs="unbounded" minOccurs="0"/>
      <xs:group ref="howtoavoid" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="messagepanel.attributes">
    <xs:attribute name="spectitle" type="xs:string"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="univ-atts"/>
    <xs:attributeGroup ref="global-atts"/>
  </xs:attributeGroup>
  
  <xs:element name="hazardsymbol" >
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="hazardsymbol.class">
          <xs:attribute ref="class" default="+ topic/image hazard-d/hazardsymbol "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:complexType name="hazardsymbol.class">
    <xs:sequence>
      <xs:group ref="hazardsymbol.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="hazardsymbol.attributes"/>
  </xs:complexType>
  
  <xs:group name="hazardsymbol.content">
    <xs:sequence>
      <xs:sequence>
      <xs:group ref="alt" minOccurs="0"/>
      <xs:group ref="longdescref" minOccurs="0"/>
    </xs:sequence>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="hazardsymbol.attributes">
      <xs:attribute name="href" type="xs:string" use="required"/>
    <xs:attribute name="keyref" type="xs:string"/>
    <!-- <xs:attribute name="alt" type="xs:string"/> -->
    <xs:attribute name="longdescref" type="xs:string"/>
    <xs:attribute name="height" type="xs:NMTOKEN"/>
    <xs:attribute name="width" type="xs:NMTOKEN"/>
    <xs:attribute name="scale" type="xs:NMTOKEN"/>
    <xs:attribute name="scalefit" type="yesno-att.class"/>
    <xs:attribute name="scope" type="scope-att.class"/>
    <xs:attribute name="align" type="xs:string"/>
    <xs:attribute name="placement" type="image-placement-att.class" default="inline"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="univ-atts"/>
    <xs:attributeGroup ref="global-atts"/>
  </xs:attributeGroup>
  
  <xs:element name="typeofhazard" >
    <xs:complexType>
      <xs:complexContent mixed="true">
        <xs:extension base="typeofhazard.class">
          <xs:attribute ref="class" default="+ topic/li hazard-d/typeofhazard "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:complexType name="typeofhazard.class" mixed="true">
    <xs:sequence>
      <xs:group ref="typeofhazard.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="typeofhazard.attributes"/>
  </xs:complexType>
  
  <xs:group name="typeofhazard.content">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="words.cnt" minOccurs="0"/>
      <xs:group ref="ph" minOccurs="0"/>
      <xs:group ref="tm" minOccurs="0"/>
    </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="typeofhazard.attributes">
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="univ-atts"/>
    <xs:attributeGroup ref="global-atts"/>
  </xs:attributeGroup>
  
  <xs:element name="consequence" >
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="consequence.class">
          <xs:attribute ref="class" default="+ topic/li hazard-d/consequence "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:complexType name="consequence.class">
    <xs:sequence>
      <xs:group ref="consequence.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="consequence.attributes"/>
  </xs:complexType>
  
  <xs:group name="consequence.content">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="words.cnt" minOccurs="0"/>
      <xs:group ref="ph" minOccurs="0"/>
      <xs:group ref="tm" minOccurs="0"/>
    </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="consequence.attributes">
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="univ-atts"/>
    <xs:attributeGroup ref="global-atts"/>
  </xs:attributeGroup>
  
  <xs:element name="howtoavoid" >
    <xs:complexType>
      <xs:complexContent mixed="true">
        <xs:extension base="howtoavoid.class">
          <xs:attribute ref="class" default="+ topic/li hazard-d/howtoavoid "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  
  <xs:complexType name="howtoavoid.class" mixed="true">
    <xs:sequence>
      <xs:group ref="howtoavoid.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="howtoavoid.content"/>
  </xs:complexType>
  
  <xs:group name="howtoavoid.content">
    <xs:sequence>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="hazard.cnt" minOccurs="0"/>
    </xs:choice>
      </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="howtoavoid.content">
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="univ-atts"/>
    <xs:attributeGroup ref="global-atts"/>
  </xs:attributeGroup>

</xs:schema>