tracefirst / usaha_committee

XML schema for electronic CVIs
8 stars 2 forks source link

Error in pattern for phone number #4

Closed mkm1879 closed 10 years ago

mkm1879 commented 10 years ago

In the PhoneNumber simple type the number of digits is 9 instead of 10. This is correct in the Number attribute of the ComplexType PhoneNumType. Just a typo I suspect. However I'm not sure how the redefinition was supposed to work. Number could just be of type PhoneNumber it looks like.

 <xs:attribute name="Number" use="required">
        <xs:simpleType>
            <xs:restriction base="PhoneNumber">
                <xs:pattern value="[0-9]{10}"/>
            </xs:restriction>
        </xs:simpleType>
 </xs:attribute>
 . . .
 <xs:simpleType name="PhoneNumber">
    <xs:annotation>
        <xs:documentation>Must be a 10-digit number without spaces, dashes etc.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
        <xs:length value="10"/>
        <!-- Error in Regex -->
        <!--<xs:pattern value="[0-9]{9}"/> change needed to get 8885551212 to be a valid phone number -->
        <xs:pattern value="[0-9]{10}"/>
    </xs:restriction>
 </xs:simpleType>