Subject: | Observation in module XML::Compile::WSDL11 |
Date: | Wed, 31 May 2017 09:34:14 +0200 |
To: | bug-XML-Compile-WSDL11 [...] rt.cpan.org |
From: | Nils Barkald <nb [...] solfaktor.com> |
Hello,
The observation is made in version 3.05 of XML::Compile::WSDL11.
A number with a leading zero should probably be accepted as value in an
element when the base type is 'xs:integer'
A value of '0519' is not accepted (this is month and year concatenated).
The error message:
string `519' does not match pattern `-?[0-9]{4,4}' at
fop_createformofpayment_11_1:FOP_CreateFormOfPayment/fopGroup/mopDescription/paymentModule/mopInformation/creditCardData/creditCardDetails/ccInfo/expiryDate#facet
The definition of the element in the XSD-file:
<xs:element name="expiryDate" minOccurs="0"
type="NumericInteger_Length4To4">
<xs:annotation>
<xs:documentation xml:lang="en">Expiry date : format
MMYY</xs:documentation>
</xs:annotation>
</xs:element>
Definition of the type:
<xs:simpleType name="NumericInteger_Length4To4">
<xs:annotation>
<xs:documentation xml:lang="en">Format limitations:
n4</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<xs:pattern value="-?[0-9]{4,4}" />
</xs:restriction>
</xs:simpleType>
Best regards
Nils Barkald
Software Engineer
Reisegiganten ASnils@reisegiganten.no
mob +47 928 46 764 pho +47 21 09 50 21