[Zope] RE: nested <dtml-in ...> statements breaking

Thomas B. Passin tpassin@mitretek.org
Fri, 7 Jun 2002 11:53:32 -0400


Try passing the argument explictly, just in case:

<dtml-in "oralargumentsquery(casecitation)">

Cheers,

Tom P


[Donald Braman]

> Sure thing. Here is are the nested dtml-in statements:
>
> <dtml-in casesquery>
>     <dtml-in oralargumentsquery>
>         <dtml-var dateargued>
>     </dtml-in>
> </dtml-in>
>
> And these are the Z SQL Methods:
>
> Z SQL Method at  /search/casesquery
> Arguments:  casenamein citationin year1 year1op year2 year2op opinionin
> orderby
>
> SELECT casecitation, year, volume, page, shortcasename, findlaw, ussc, lii
> FROM cases
> WHERE year > 0 AND year < 2000
> <dtml-if citationin>AND casecitation LIKE <dtml-sqlvar citationin
> type="string"></dtml-if>
> <dtml-if year1>AND year <dtml-var year1op> <dtml-sqlvar year1
> type="string"></dtml-if>
> <dtml-if year2>AND year <dtml-var year2op> <dtml-sqlvar year2
> type="string"></dtml-if>
> <dtml-if casenamein>AND CONTAINS (shortcasename, <dtml-sqlvar casenamein
> type="string">)</dtml-if>
> <dtml-if opinionin>AND CONTAINS (opinion, <dtml-sqlvar opinionin
> type="string">)</dtml-if>
> <dtml-if orderby>ORDER BY <dtml-var orderby> ASC</dtml-if>
> ;
>
>
> Z SQL Method at  /search/oralargumentsquery
> Arguments  casecitation
>
> SELECT *
> FROM oralarguments
> WHERE <dtml-sqltest casecitation type=string>
> ORDER BY dateargued
>
>
> That's it!
>
>
> -----Original Message-----
> From: Kevin Carlson [mailto:khcarlso@bellsouth.net]
> Sent: Thursday, June 06, 2002 8:12 PM
> To: donald.braman@yale.edu
> Subject: RE: [Zope] nested <dtml-in ...> statements breaking
>
>
> Hi Donald,
>
> Could you post the code?
>
> Thanks,
>
> Kevin
>
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Donald Braman
> Sent: Thursday, June 06, 2002 10:57 PM
> To: Zope@Zope. Org
> Subject: [Zope] nested <dtml-in ...> statements breaking
>
>
> I have nested queries using dtml-in statements.
>
> The outer query performs a broad query based on a number of variables and
> returns a number of variables for several records.
>
> The inner query performs a dtml-sqltest on one of the variables returned
and
> returns another set of variables. (Or at least it is supposed to.) The
only
> variable that two queries share is the variable on which the inner query
> performs the dtml-sqltest.
>
> The inner query gives me a key error, asking for a variable supplied by
the
> outer query.
>
> Strangely, the inner query works when nested within a query that returns a
> single record using the same dtml-sqltest as the inner query.
>
> Any pointers on how to manage this?
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )