[Zope-dev] Bug with sequence-query and dtml-in?

Erik Stephens erik.stephens@newtimes.com
Tue, 24 Jul 2001 18:06:24 -0700


Judging from the source in DocumentTemplate.DT_In.py and
DocumentTemplate.DT_InSV.py, it APPEARS that the handling of
'sequence-query' is buggy.  It looks like in InClass's constructor, it
will define the regular expression 'start_name_re' only if the 'start'
attribute was specified AND the value for 'start' is non-numeric.
Makes sense since it will remove that variable from the query string
if it exists.  However, the sequence_variables class will raise an
error if 'start_name_re' is not defined when trying to get the value
of 'sequence-query'.  Shouldn't I be able to get the value of
'sequence-query' if I do something like:

  <dtml-in some_list start=5>
    ...

Perhaps this is the intended behavior?  Does it not make sense to be
wanting to look at 'sequence-query' if I'm specifying a constant
'start' value?

Both 2.1.x and 2.3.x versions handle 'sequence-query' this way.

Thanks,
Erik Stephens