source |
<xs:simpleType name="SFFloat">
<xs:annotation>
<xs:appinfo>
<xs:attribute name="defaultValue" type="SFFloat" default="0.0"/>
<!-- https://stackoverflow.com/questions/10516967/regexp-for-a-double -->
<xs:pattern value="\s*([+-]?((0|[1-9][0-9]*)(\.[0-9]*)?|\.[0-9]+)([Ee][+-]?[0-9]+)?)\s*"/>
SFFloat is a single-precision floating-point type.
</xs:appinfo>
<xs:documentation source="https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/fieldsDef.html#SFFloatAndMFFloat"/>
</xs:annotation>
<xs:restriction base="xs:float">
<xs:pattern value="\s*([+-]?((0|[1-9][0-9]*)(\.[0-9]*)?|\.[0-9]+)([Ee][+-]?[0-9]+)?)\s*"/>
</xs:restriction>
</xs:simpleType> |