Hello DFDL community,

My input consists of an integer up to 2 digits. These are all legal input 
values:

        0, 99, +99, -99, 1, -1

The below DFDL schema exploits XML Schema validation. It's simple and works 
perfect. I believe that the input cannot be described using just the DFDL text 
number properties. Do you agree?  /Roger

<xs:element name="Number">
    <xs:simpleType>
        <xs:annotation>
            <xs:appinfo source="http://www.ogf.org/dfdl/";>
                <dfdl:assert test="{ dfdl:checkConstraints(.) }"/>
            </xs:appinfo>
        </xs:annotation>
        <xs:restriction base="xs:integer">
            <xs:totalDigits value="2" />
        </xs:restriction>
    </xs:simpleType>
</xs:element> 

Reply via email to