Skip Menu |

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

Report information
The Basics
Id: 35699
Status: resolved
Priority: 0/
Queue: XML-Compile

People
Owner: Nobody in particular
Requestors: daniel314 [...] gmail.com
Cc:
AdminCc:

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



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 }
Subject: Re: [rt.cpan.org #35699] gYear type incorrectly defined in the XML schema? (XML-Compile-0.81)
Date: Wed, 7 May 2008 22:22:42 +0200
To: Daniel Carroll via RT <bug-XML-Compile [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Daniel Carroll via RT (bug-XML-Compile@rt.cpan.org) [080507 20:11]: Show quoted text
> Wed May 07 16:11:04 2008: Request 35699 was acted upon. > Transaction: Ticket created by daniel314@gmail.com > Queue: XML-Compile > Subject: gYear type incorrectly defined in the XML schema? (XML-Compile-0.81) > > The patch below should resolve this bug.
You're right. Bad copy-pasting between all these time and date formats. According to the specs, the timezoneFrag is still there. Show quoted text
> -my $gYear = qr/^ $yearFrag \- $monthFrag $timezoneFrag? $/x; > +my $gYear = qr/^ $yearFrag $/x;
Will become in 0.82: +my $gYear = qr/^ $yearFrag $timezoneFrag? $/x; Thanks for the report. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Got fixed in 0.82