<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="../schema2xhtml.xsl" type="text/xsl"?>

<!-- This schema is part of JMRI. Copyright 2009.                           -->
<!--                                                                        -->
<!-- JMRI is free software; you can redistribute it and/or modify it under  -->
<!-- the terms of version 2 of the GNU General Public License as published  -->
<!-- by the Free Software Foundation. See the "COPYING" file for a copy     -->
<!-- of this license.                                                       -->
<!--                                                                        -->
<!-- JMRI is distributed in the hope that it will be useful, but WITHOUT    -->
<!-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or  -->
<!-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License  -->
<!-- for more details.                                                      -->


<!-- Need annotations                                                 -->
<!-- Attributes need to get types right esp. for enumerated           -->
<!-- Attributes need REQUIRED/IMPLIED                                 -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:docbook="http://docbook.org/ns/docbook"
           xmlns:jmri="http://jmri.org/xml/schema/JMRIschema"
           xsi:schemaLocation="
                http://jmri.org/xml/schema/JMRIschema http://jmri.org/xml/schema/JMRIschema.xsd
                http://docbook.org/ns/docbook http://jmri.org/xml/schema/docbook/docbook.xsd
            "
        >
    <xs:complexType name="TransitManagerType">
      <xs:annotation>
        <xs:documentation>
          Define the XML structure for storing the contents of a TransitManager implementation.
        </xs:documentation>
        <xs:appinfo>
            <jmri:usingclass configurexml="true">jmri.configurexml.TransitManagerXml</jmri:usingclass>
        </xs:appinfo>
      </xs:annotation>
      <xs:sequence>
        
        <xs:element name="transit" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="systemName" type="systemNameType" minOccurs="0" maxOccurs="1"/>
	      <xs:element name="userName" type="userNameType" minOccurs="0" maxOccurs="1"/>
	      <xs:element name="comment" type="commentType" minOccurs="0" maxOccurs="1"/>
              <xs:element name="transitsection" minOccurs="1" maxOccurs="unbounded" >
                <xs:complexType>
                  <xs:sequence>
              	    <xs:element name="transitsectionaction" minOccurs="0" maxOccurs="unbounded" >
                      <xs:complexType>
                        <xs:attribute name="whencode" type="xs:integer" />                      
                        <xs:attribute name="whatcode" type="xs:integer" />                      
                        <xs:attribute name="whendata" type="xs:integer" />                      
                        <xs:attribute name="whenstring" type="xs:string" />                      
                        <xs:attribute name="whatdata1" type="xs:integer" />                      
                        <xs:attribute name="whatdata2" type="xs:integer" />                      
                        <xs:attribute name="whatstring" type="xs:string" />                      
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="sectionname" type="xs:string" />
                  <xs:attribute name="sequence" type="xs:integer" />
                  <xs:attribute name="direction" type="xs:integer" />
                  <xs:attribute name="alternate" type="yesNoType" />
                  <xs:attribute name="safe" type="yesNoType" />
                  <xs:attribute name="stopallocatingsensor" type="xs:string" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="systemName" type="systemNameType">
                <xs:annotation><xs:documentation>Deprecated 2.9.6 in favor of separate element</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="userName" type="userNameType">
                <xs:annotation><xs:documentation>Deprecated 2.9.6 in favor of separate element</xs:documentation></xs:annotation>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
            
      </xs:sequence>
      <xs:attribute name="class" type="classType" use="required"/>
    </xs:complexType>

</xs:schema>
