hi to everybody why does this wortk : <dtml-with expr="x010314"> and not this : <dtml-with expr="010314"> ???????? the quotes should prevent it from being treated as a number i guess ??? thanx SVEN
On Thu, 22 Mar 2001, Sven wrote:
why does this wortk :
<dtml-with expr="x010314">
and not this :
<dtml-with expr="010314">
Sven -- I'm not sure what you mean? What are you trying to do? Is x0101314 a name of an object/property/method/etc? -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
Sven wrote:
hi to everybody
why does this wortk :
<dtml-with expr="x010314">
and not this :
<dtml-with expr="010314">
???????? the quotes should prevent it from being treated as a number i guess ???
thanx
SVEN
You have run into an unintuitive feature of dtml. That is that Quoted attributes are treated as expressions unless you explicitly use the name="..." syntax. so your first example, expr="x010314" is treated as: The object named x010314 Whereas the second example is treated as: The number 10314. Both are expressions, but the top one cannot be evaluated as a Python number, so it is treated as an object reference. name="x010314" and name="010314" would both treat them as object references as would expr="_['010314']" which all explicitly look for objects by name. You would also run into a similar problem if your object names contain punctuation the is considered significant in Python such as a period, space or dash. hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
participants (3)
-
Casey Duncan -
Joel Burton -
Sven