elementFormDefault="qualified"
attributeFormDefault="unqualified">
......
<xs:attribute name="time" type="xs:decimal" use="required">
......
</xs:schema>
Lets see definition of decimal in http://www.w3.org/2001/XMLSchema
XML Schema 1.1
An XML Schema schema document for XML Schema schema documents.
XMLSchema.xsd contains:
<xs:simpleType name="decimal" id="decimal">
<xs:annotation>
<xs:appinfo>
<hfp:hasFacet name="totalDigits"/>
<hfp:hasFacet name="fractionDigits"/>
<hfp:hasFacet name="pattern"/>
<hfp:hasFacet name="whiteSpace"/>
<hfp:hasFacet name="enumeration"/>
<hfp:hasFacet name="maxInclusive"/>
<hfp:hasFacet name="maxExclusive"/>
<hfp:hasFacet name="minInclusive"/>
<hfp:hasFacet name="minExclusive"/>
<hfp:hasProperty name="ordered" value="total"/>
<hfp:hasProperty name="bounded" value="false"/>
<hfp:hasProperty name="cardinality" value="countably infinite"/>
<hfp:hasProperty name="numeric" value="true"/>
</xs:appinfo>
<xs:documentation source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
</xs:annotation>
<xs:restriction base="xs:anySimpleType">
<xs:whiteSpace value="collapse" fixed="true" id="decimal.whiteSpace"/>
</xs:restriction>
</xs:simpleType>
And finally above leads to documentation which states
3.2.3.1 Lexical representation
*decimal* has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39) separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, "+" is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zero(es) can be omitted. For example: `-1.23, 12678967.543233, +100000.00, 210`.
3.2.3.2 Canonical representation
The canonical representation for *decimal* is defined by prohibiting certain options from the Lexical representation (§3.2.3.1). Specifically, the preceding optional "+" sign is prohibited. The decimal point is required. Leading and trailing zeroes are prohibited subject to the following: there must be at least one digit to the right and to the left of the decimal point which may be a zero.
For me it is clear value 12678967.543233 is legal for "time" and should not lead to an error as it does. Nikolas Falco So IMO this should be reopened and fixed. |