<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    
    <xsd:element name="test">
        <xsd:complexType>
            <xsd:choice>
                <xsd:element name="Depth" type="positiveScalarElementType">
                    <xsd:annotation>
                        <xsd:documentation>Element specifying a depth below the surface of the water.</xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:complexType name="positiveScalarElementType">
        <xsd:annotation>
            <xsd:documentation>Type for an element with a single scalar valued attribute that is greater than or 0.</xsd:documentation>
        </xsd:annotation>
        <xsd:attribute name="value" type="positiveScalarType" use="required"/>
        <xsd:attributeGroup ref="CommonAttributes"/>
    </xsd:complexType>


    <xsd:simpleType name="positiveScalarType">
        <xsd:annotation>
            <xsd:documentation>Represents a floating point number that is greater than 0.0</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:double">
            <xsd:minInclusive value="0"/>
        </xsd:restriction>
    </xsd:simpleType>
    
    <!-- Attribute groups containing attribute sequences utilized by multiple element types -->
    <xsd:attributeGroup name="CommonAttributes">
        <xsd:annotation>
            <xsd:documentation>Attributes common to all elements of the tagset.</xsd:documentation>
        </xsd:annotation>
        <xsd:attribute name="timeStamp" type="nonNegativeScalarType" use="optional"/>
        <xsd:attribute name="description" type="xsd:string" use="optional"/>
        <xsd:attribute name="id" type="xsd:ID" use="optional"/>
        <!--		<xsd:attribute name="idRef" type="xsd:IDREF" use="optional"/> -->
    </xsd:attributeGroup>
    
    <xsd:simpleType name="nonNegativeScalarType">
        <xsd:annotation>
            <xsd:documentation>Represents a floating point number that is greater than or equal to 0.0</xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:double">
            <xsd:minInclusive value="0"/>
        </xsd:restriction>
    </xsd:simpleType>

</xsd:schema>