ISSUE-101: fractionDigits, minLength and maxLength proposed patterns

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ISSUE-101: fractionDigits, minLength and maxLength proposed patterns

SWD Issue Tracker


ISSUE-101: fractionDigits, minLength and maxLength proposed patterns

http://www.w3.org/2005/06/tracker/databinding/issues/101

Raised by: George Cowe
On product: Advanced

DecimalSimpleTypeFractionDigits
Pattern
.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) =
xs:QName('xs:decimal') and xs:fractionDigits/@value]/
         (., @base, xs:fractionDigits/(., @value))
Example
         <xs:simpleType name="DecimalSimpleTypeFractionDigits">
            <xs:restriction base="xs:decimal">
               <xs:fractionDigits value="2"/>
            </xs:restriction>
         </xs:simpleType>

RestrictedMaxLength
Pattern
.//xs:simpleType/xs:restriction/xs:maxLength[@value]/(.., ../@base, ., @value)
Example
        <xsd:simpleType name="RestrictedMaxLength">
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="12"/>
                </xsd:restriction>
        </xsd:simpleType>

RestrictedMinLength
Pattern
.//xs:simpleType/xs:restriction/xs:minLength[@value]/(.., ../@base, ., @value)
Example
        <xsd:simpleType name="RestrictedMinLength">
                <xsd:restriction base="xsd:string">
                        <xsd:minLength value="2"/>
                </xsd:restriction>
        </xsd:simpleType>