[Zope] parsing strings in DTML

Bill Anderson bill@libc.org
Mon, 26 Jun 2000 15:18:15 -0600


Timothy Wilson wrote:
> 
> On Mon, 26 Jun 2000, Rik Hoekstra wrote:
> 
> > try something like (untested):
> >
> > <dtml-call "REQUEST.set('parse_address', _string.split(old_address, '$')">
> >
> > for parsing the string
> 
> But what if "parse_address" comes from a SQL query? Like this:
> 
> <dtml-in qry_contactInfo>
>   <dtml-call "REQUEST.set(<dtml-var parse_address>, ... etc.
> 
> Don't I run into trouble with nested DTML here?


Untested, but should be correct:

 <dtml-in qry_contactInfo>
   <dtml-call "REQUEST.set(_['parse_address'], ... etc.