[Xml-compile] XML::Compile v0.91

Mark Overmeer mark at overmeer.net
Wed Aug 6 09:33:36 BST 2008


* Mark Overmeer (mark at overmeer.net) [080805 22:35]:
> * Drew Taylor (drew at drewtaylor.com) [080805 14:07]:
> > I think I've come across a bug in 0.91 regarding minOccurs. I've tried  
> > to simplify down things as much as possible w/o removing the possible  
> > sources of trouble.
> 
> I'll investigate it tomorrow.
> Does it work if you change maxOccurs="5" into maxOccurs="unbounded"
> in both cases?  Those are different optimization paths.

Probably your problem is fixed with this change
XML/Compile/Translate/Writer.pm line 291

    my $opt = $max - $min;
    sub { my ($doc, $values) = @_;
          my @values = ref $values eq 'ARRAY' ? @$values
                     : defined $values ? $values : ();

          ( (map { $required->($doc, shift @values) } 1..$min)
          , (map { $optional->($doc, shift @values) } 1..$opt)
 +        , undef
          );
        };

Same fix needed at line 274
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list