<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 */
-->
<xsd:schema
  targetNamespace="http://www.example.com/Bad"
  xmlns:this="http://www.example.com/Bad" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:simpleType name="badFacetForType" >
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cos-applicable-facets">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
            <xsd:maxInclusive value="0"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetRepeat">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#maxInclusive-value">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:decimal">
            <xsd:maxInclusive value="0"/>
            <xsd:maxInclusive value="0"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetExtraAttribute">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#maxInclusive-value">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:decimal">
            <xsd:maxInclusive value="0" bad="bad"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetMissingValue">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#maxInclusive-value">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:decimal">
            <xsd:maxInclusive/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetValue">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#maxInclusive-value">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:decimal">
            <xsd:maxInclusive value="a"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetFixed">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#maxInclusive-fixed">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:decimal">
            <xsd:maxInclusive value="0" fixed="bad"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetRestriction">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#maxInclusive-valid-restriction">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:decimal">
                    <xsd:maxInclusive value="2"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:maxInclusive value="3"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetRestrictionFixed">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#dc-maxInclusive">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:decimal">
                    <xsd:maxInclusive value="2" fixed="true"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:maxInclusive value="3"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToDecimal">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:decimal">
                    <xsd:maxInclusive value="3"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="4"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToDouble">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:double">
                    <xsd:maxInclusive value="2.9"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="3.0"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToFloat">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:float">
                    <xsd:maxInclusive value="2.9"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="3.0"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToDuration">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:duration">
                    <xsd:maxInclusive value="P1D"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="P2D"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToDate">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:date">
                    <xsd:maxInclusive value="1999-10-25"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="1999-10-26"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToTime">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:time">
                    <xsd:maxInclusive value="13:20:00-05:00"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="13:20:00-05:01"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToDateTime">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:dateTime">
                    <xsd:maxInclusive value="1999-05-31T13:20:00-05:00"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="1999-05-31T13:20:00-05:01"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToGYear">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:gYear">
                    <xsd:maxInclusive value="1998"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="1999"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToGMonth">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:gMonth">
                    <xsd:maxInclusive value="--11--"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="--12--"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToGYearMonth">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:gYearMonth">
                    <xsd:maxInclusive value="1999-11"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="1999-12"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToGDay">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:gDay">
                    <xsd:maxInclusive value="---30"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="---31"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="badMaxInclusiveFacetAppliedToGMonthDay">
        <xsd:annotation>
            <xsd:documentation source="http://www.w3.org/TR/xmlschema-2/#cvc-maxInclusive-valid">
            </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="xsd:gMonthDay">
                    <xsd:maxInclusive value="--10-30"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:enumeration value="--10-31"/>
        </xsd:restriction>
    </xsd:simpleType>
</xsd:schema>
