What's the difference between <dtml-var and <!--#var
Reading the documentation for Zope had me believing that <dtml-var and <!--#var was different. Now reading the postings with the subject Is it Just Me, I don't know if they are different. Will someone please enlighten me to the difference and where you would use one over the other (if they are different). In the documentation (at the beginning of the DTML reference, it states: The DTML Tag is supported by three syntaxes.1 This includes the DTML document templates, server-side includes and Python string formats. When using document templates from Python, the syntax used depends on the document template class used (or subclasses). The server-side-include new DTML syntax described here is used by the classes DocumentTemplate.HTML and DocumentTemplate.HTMLFile. The syntax formats are shown below: <dtml-name> %(name)x <!--#name--> I assumed that the last is the server side include format (although you could not tell by the syntax of the preceding documentation!) Perhaps this document could be fixed a bit for us newbies?
On Mon, 10 Apr 2000 Brian.Burton@nlynx.com wrote:
Reading the documentation for Zope had me believing that <dtml-var and <!--#var was different. Now reading the postings with the subject Is it Just Me, I don't know if they are different. Will someone please enlighten me to the difference and where you would use one over the other (if they are different).
There is no difference. The <dtml-var ... was introduced to make dtml play better with certain editors and also it is clearer in some respects. See the latest email by Paul Everitt in the archives. pavlos
No difference. Just lexical styles. Brian.Burton@nlynx.com wrote:
Reading the documentation for Zope had me believing that <dtml-var and <!--#var was different. Now reading the postings with the subject Is it Just Me, I don't know if they are different. Will someone please enlighten me to the difference and where you would use one over the other (if they are different). In the documentation (at the beginning of the DTML reference, it states:
The DTML Tag is supported by three syntaxes.1 This includes the DTML document templates, server-side includes and Python string formats. When using document templates from Python, the syntax used depends on the document template class used (or subclasses). The server-side-include new DTML syntax described here is used by the classes DocumentTemplate.HTML and DocumentTemplate.HTMLFile.
The syntax formats are shown below:
<dtml-name>
%(name)x
<!--#name-->
I assumed that the last is the server side include format (although you could not tell by the syntax of the preceding documentation!) Perhaps this document could be fixed a bit for us newbies?
_______________________________________________ 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 )
-- Ken Kinder 303.381.7631
<!--#var is Zope 1.x and will work in Zope 2.x <dtml-var is Zope 2.x and will not work in Zope1.x another difference is that <dtml-var is 1 character longer than <!--#var ----- Original Message ----- From: <Brian.Burton@nlynx.com> To: <zope@zope.org> Sent: Monday, April 10, 2000 4:20 PM Subject: [Zope] What's the difference between <dtml-var and <!--#var Reading the documentation for Zope had me believing that <dtml-var and <!--#var was different. Now reading the postings with the subject Is it Just Me, I don't know if they are different. Will someone please enlighten me to the difference and where you would use one over the other (if they are different). In the documentation (at the beginning of the DTML reference, it states: The DTML Tag is supported by three syntaxes.1 This includes the DTML document templates, server-side includes and Python string formats. When using document templates from Python, the syntax used depends on the document template class used (or subclasses). The server-side-include new DTML syntax described here is used by the classes DocumentTemplate.HTML and DocumentTemplate.HTMLFile. The syntax formats are shown below: <dtml-name> %(name)x <!--#name--> I assumed that the last is the server side include format (although you could not tell by the syntax of the preceding documentation!) Perhaps this document could be fixed a bit for us newbies? _______________________________________________ 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 )
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In article <004501bfa339$05c4cc30$29a8efd0@atinucleus.com>, Jim Sanford <jsanford@atinucleus.com> writes
<!--#var is Zope 1.x and will work in Zope 2.x
<dtml-var is Zope 2.x and will not work in Zope1.x
another difference is that <dtml-var is 1 character longer than <!--#var
Not quite true. <!--#var needs to be terminated by '-->' where <dtml-var needs only '>' So, the older syntax is 1 character longer <g>. - -- Regards, Graham Chiu gchiu<at>compkarori.co.nz http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin -----BEGIN PGP SIGNATURE----- Version: PGPsdk version 1.7.1 iQA/AwUBOPHDnbTRdIWzaLpMEQI3jwCfVhJwY4PHPHjkINZb/qM1HjO9YFkAoM3h YXgTOBHRtyNpRfyXpVQY/p1w =Q239 -----END PGP SIGNATURE-----
On Tue, Apr 11, 2000 at 12:05:48PM +1300, Graham Chiu wrote:
In article <004501bfa339$05c4cc30$29a8efd0@atinucleus.com>, Jim Sanford <jsanford@atinucleus.com> writes
<!--#var is Zope 1.x and will work in Zope 2.x
<dtml-var is Zope 2.x and will not work in Zope1.x
another difference is that <dtml-var is 1 character longer than <!--#var
Not quite true. <!--#var needs to be terminated by '-->' where <dtml-var needs only '>'
So, the older syntax is 1 character longer <g>.
Also, I think the older syntax is deprecated, so it probably shouldn't be used even though it still works. -- Harry Henry Gebel, Senior Developer, Landon House SBS West Dover Hundred, Delaware PyNcurses: python binding for ncurses http://pyncurses.sourceforge.net
participants (6)
-
Brian.Burton@nlynx.com -
Graham Chiu -
Harry Henry Gebel -
Jim Sanford -
Ken Kinder -
Pavlos Christoforou