XML technologies / XML Schema / Data type reference / xs:nonPositiveInteger

(Excerpt from “XML Schema” by Eric van der Vlist)

Nonpositive integers of arbitrary length

Derived from: xs:integer

Primitive type: xs:decimal

Known subtypes: xs:negativeInteger

Facets: xs:enumeration, xs:fractionDigits, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, xs:minInclusive, xs:pattern, xs:totalDigits, xs:whiteSpace

Definition

<xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">
    <xs:restriction base="xs:integer">
        <xs:maxInclusive value="0"/>
    </xs:restriction>
</xs:simpleType>

Description

The value space of xs:nonPositiveInteger contains all integers less than or equal to 0, without range limits. The lexical space permits any number of insignificant leading zeros.

Restrictions

A decimal point is forbidden, even when followed only by insignificant zeros.

Example

Valid values include "-123456789012345678901234567890", "0", "-0000000000000000000005" or "-2147483647".

Invalid values include "-1." or "1.".

   

 

 

 

back to top