<?xml version="1.0" encoding="UTF-8"?>
<!--
// Description: autoConfigure.xsd
// Author: The SPIRIT Consortium Schema Working Group
// 
// Revision:    $Revision: 1350 $
// Date:        $Date: 2008-10-07 15:16:07 -0500 (Tue, 07 Oct 2008) $
// 
// Copyright (c) 2005, 2006, 2007, 2008 The SPIRIT Consortium.
// 
// This work forms part of a deliverable of The SPIRIT Consortium.
// 
// Use of these materials are governed by the legal terms and conditions
// outlined in the disclaimer available from www.spiritconsortium.org.
// 
// This source file is provided on an AS IS basis.  The SPIRIT
// Consortium disclaims any warranty express or implied including
// any warranty of merchantability and fitness for use for a
// particular purpose.
// 
// The user of the source file shall indemnify and hold The SPIRIT
// Consortium and its members harmless from any damages or liability.
// Users are requested to provide feedback to The SPIRIT Consortium
// using either mailto:feedback@lists.spiritconsortium.org or the forms at 
// http://www.spiritconsortium.org/about/contact_us/
// 
// This file may be copied, and distributed, WITHOUT
// modifications; this notice must be included on any copy.
-->
<xs:schema xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5" elementFormDefault="qualified" attributeFormDefault="qualified">
    <xs:include schemaLocation="configurable.xsd"/>
    <xs:simpleType name="formatType">
        <xs:annotation>
            <xs:documentation>This is an indication on the formatof the value for user defined properties.  bitString means either a double quoted string of 1's an 0's or a scaledInteger number. bool means a boolean (true, false) is expected.  float means a decimal floating point number is expected.  long means an value of scaledInteger is expected.  String means any text is acceptable.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:token">
            <xs:enumeration value="bitString"/>
            <xs:enumeration value="bool"/>
            <xs:enumeration value="float"/>
            <xs:enumeration value="long"/>
            <xs:enumeration value="string"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:attribute name="format" type="spirit:formatType">
        <xs:annotation>
            <xs:documentation>This is an indication on the format of the value for user defined properties.  bitString means a double quoted string of 1's an 0's, the input maybe in this format or a scaledInteger number. A bitStringLength attribute is required for bitString formats. bool means a boolean (true, false) is expected.  float means a decimal floating point number is expected.  long means an value of scaledInteger is expected.  String means any text is acceptable.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="bitStringLength" type="xs:nonNegativeInteger">
        <xs:annotation>
            <xs:documentation>Length of the bit string, required if the format is bitString</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="prompt" type="xs:string">
        <xs:annotation>
            <xs:documentation>Provides a string used to prompt the user for user-resolved property values.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="minimum" type="xs:string">
        <xs:annotation>
            <xs:documentation>For user-resolved properties with numeric values, this indicates the minimum value allowed. Only valid for formats long and float.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="maximum" type="xs:string">
        <xs:annotation>
            <xs:documentation>For user-resolved properties with numeric values, this indicates the maximum value allowed. Only valid for formats long and float</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:simpleType name="rangeTypeType">
        <xs:annotation>
            <xs:documentation>This type is used to indicate how the minimum and maximum attributes values should be interpreted. For purposes of this attribute, an int is 4 bytes and a long is 8 bytes.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:token">
            <xs:enumeration value="float"/>
            <xs:enumeration value="int"/>
            <xs:enumeration value="unsigned int"/>
            <xs:enumeration value="long"/>
            <xs:enumeration value="unsigned long"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:attribute name="rangeType" type="spirit:rangeTypeType" default="float">
        <xs:annotation>
            <xs:documentation>Indicates the data type of the range attributes (minimum and maximum). For reasons of backward compatibility, this attribute is assumed to have the value 'float' if not present.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:simpleType name="delayValueUnitType">
        <xs:annotation>
            <xs:documentation>Indicates legal units for delay values.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:token">
            <xs:enumeration value="ps"/>
            <xs:enumeration value="ns"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:attribute name="order" type="xs:float">
        <xs:annotation>
            <xs:documentation>For components with auto-generated configuration forms, the user-resolved properties with order attibutes will be presented in ascending order.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="choiceRef" type="xs:Name">
        <xs:annotation>
            <xs:documentation>For user defined properties, refers the choice element enumerating the values to choose from.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attribute name="configGroups" type="xs:NMTOKENS">
        <xs:annotation>
            <xs:documentation>Tags configurable properties so that they may be grouped together.  Configurable properties with matching values for this attribute are contained in the same group. The format of this attribute is a string. There is no semantic meaning to this attribute.</xs:documentation>
        </xs:annotation>
    </xs:attribute>
    <xs:attributeGroup name="bool.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on boolean elements for which the schema supplies a default prompt attribute.</xs:documentation>
        </xs:annotation>
        <xs:attribute ref="spirit:format" default="bool"/>
        <xs:attributeGroup ref="spirit:common.att"/>
        <xs:attribute ref="spirit:rangeType" default="int"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="bool.prompt.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on boolean elements.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="spirit:bool.att"/>
        <xs:attribute ref="spirit:prompt"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="float.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on float elements for which the schema supplies a default prompt attribute.</xs:documentation>
        </xs:annotation>
        <xs:attribute ref="spirit:format" default="float"/>
        <xs:attributeGroup ref="spirit:common.att"/>
        <xs:attribute ref="spirit:rangeType" default="float"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="float.prompt.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on float elements.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="spirit:float.att"/>
        <xs:attribute ref="spirit:prompt"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="long.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on long integer elements for which the schema supplies a default prompt attribute.</xs:documentation>
        </xs:annotation>
        <xs:attribute ref="spirit:format" default="long"/>
        <xs:attributeGroup ref="spirit:common.att"/>
        <xs:attribute ref="spirit:rangeType" default="float"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="long.prompt.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on long integer elements.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="spirit:long.att"/>
        <xs:attribute ref="spirit:prompt"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="string.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on string elements for which the schema supplies a default prompt attribute.</xs:documentation>
        </xs:annotation>
        <xs:attribute ref="spirit:format" default="string"/>
        <xs:attributeGroup ref="spirit:common.att"/>
        <xs:attribute ref="spirit:rangeType"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="string.prompt.att">
        <xs:annotation>
            <xs:documentation>Use this attribute group on string elements.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="spirit:string.att"/>
        <xs:attribute ref="spirit:prompt"/>
    </xs:attributeGroup>
    <xs:attributeGroup name="common.att">
        <xs:annotation>
            <xs:documentation>For internal use only.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="spirit:configurable"/>
        <xs:attribute ref="spirit:choiceRef"/>
        <xs:attribute ref="spirit:order"/>
        <xs:attribute ref="spirit:configGroups"/>
        <xs:attribute ref="spirit:bitStringLength"/>
        <xs:attribute ref="spirit:minimum"/>
        <xs:attribute ref="spirit:maximum"/>
    </xs:attributeGroup>
    <xs:element name="choices">
        <xs:annotation>
            <xs:documentation>Choices used by elements with an attribute spirit:choiceRef.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="choice" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation>Non-empty set of legal values for a elements with an attribute spirit:choiceRef.</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="name" type="xs:Name">
                                <xs:annotation>
                                    <xs:documentation>Choice key, available for reference by the spirit:choiceRef attribute.</xs:documentation>
                                </xs:annotation>
                            </xs:element>
                            <xs:element name="enumeration" maxOccurs="unbounded">
                                <xs:annotation>
                                    <xs:documentation>One possible value of spirit:choice</xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:simpleContent>
                                        <xs:extension base="xs:string">
                                            <xs:attribute name="text" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>When specified, displayed in place of the spirit:enumeration value </xs:documentation>
                                                </xs:annotation>
                                            </xs:attribute>
                                            <xs:attribute name="help" type="xs:string">
                                                <xs:annotation>
                                                    <xs:documentation>Text that may be displayed if the user requests help about the meaning of an element</xs:documentation>
                                                </xs:annotation>
                                            </xs:attribute>
                                        </xs:extension>
                                    </xs:simpleContent>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
