Skip Menu |

This queue is for tickets about the XML-Validator-Schema CPAN distribution.

Report information
The Basics
Id: 9664
Status: resolved
Priority: 0/
Queue: XML-Validator-Schema

People
Owner: Nobody in particular
Requestors: michael.fox [...] auspost.com.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.08
Fixed in: (no value)



Subject: problem with xs:decimal type in XML-Validator-Schema-1.08
XML-Validator-Schema-1.08 This make be wrong - I don't know much about XML. My problem is that a decial like .56 is invalid, it needs 0.56 to pass. This sort of output comes from modules like XML-Generator-DBI-1.00, which I think happens because DBI is returning a string (like .56). I attached a test for the digits.yml test, and my suggested code patch to SimpleType.pm is below(only seem to be able to attach one patch) 87c87 < $BUILTIN{decimal}->restrict(pattern => qr/^[+-]?\d*(?:\.\d+)?$/); --- Show quoted text
> $BUILTIN{decimal}->restrict(pattern => qr/^[+-]?\d+(?:\.\d+)?$/);
96,105d95 < --- | < <dec>0.45</dec> < --- > < PASS < < --- | < <dec>.45</dec> < --- > < PASS <
You're right. Here's the relevent chunk of the spec: http://www.w3.org/TR/xmlschema-2/#decimal I'll put this in for the next release. Thanks!
This is fixed for v1.10 going out today. Sorry I missed it for v1.09.