Subject: | gYear type incorrectly defined in the XML schema? (XML-Compile-0.81) |
Date: | Wed, 7 May 2008 14:10:16 -0600 |
To: | bug-XML-Compile [...] rt.cpan.org |
From: | Daniel Carroll <daniel314 [...] gmail.com> |
Hello,
When I tried to validate a sample XML file, I encountered an unexpected error
with an element declared as a gYear type. Upon further investigation, I think the
type was incorrectly declared in the XML::Compile::Schema::BuiltInTypes module.
The patch below should resolve this bug. If you have any questions, feel free to
contact me.
Thanks!
- Dan (Daniel Carroll - daniel314@gmail.com)
--- XML-Compile-0.81.hasabug/lib/XML/Compile/Schema/BuiltInTypes.pm 2008-04-29 10:57:57.000000000 -0600
+++ XML-Compile-0.81/lib/XML/Compile/Schema/BuiltInTypes.pm 2008-05-07 14:02:18.000000000 -0600
@@ -331,7 +331,7 @@
};
-my $gYear = qr/^ $yearFrag \- $monthFrag $timezoneFrag? $/x;
+my $gYear = qr/^ $yearFrag $/x;
$builtin_types{gYear} =
{ parse => \&_collapse
, check => sub { (my $val = $_[0]) =~ s/\s+//g; $val =~ $gYear }