[Zope] <dtml-var> and double quotes in variable name

Dieter Maurer dieter@handshake.de
Tue, 3 Jun 2003 20:33:30 +0200

Derek Basch wrote at 2003-6-2 11:06 -0700:
 > I am wondering if there is any way to include double quotes in a <dtml-var> name? For instance:
 > <dtml-var /"Date/">
 > assuming / escapes the double quote.

You should chose better variable names...

But, there is a way:

     <dtml-var "_['\x22Date\x22']">

 > I ask because the variable is referencing an SQL field name that is also a Interbase/Firebird
 > keyword. (Date, Time, etc...). Interbase requires a pair of double quotes in such a situation.

But that does not mean that you must include the quotes in the
DTML variable names.

Your options (among others):

     "col" = <dtml-sqlvar col type=string>
     <dtml-sqltest col column="col" type=string>