def floor_from_str(src):
    """A more complex restriction on integer.  A comment in the XSD assures
    that the value 1 is valid in the schema only for legacy reasons.  In
    other words, we may encounter content with a value of 1 but we should
    not generate this value in our output.

    <xs:simpleType name="Floor">
            <xs:restriction base="xs:integer">
                    <xs:maxInclusive value="1"/>
                    <xs:minInclusive value="-100"/>
            </xs:restriction>
    </xs:simpleType>
    """
    value = int(src)
    if value < -100 or value > 1:
        raise ValueError('Value out of bounds defined for FLOOR: %i' % value)
    return value
