Re: [Zope-dev] DTML block parsing

2001-01-23 Thread Steve Alexander

Casey Duncan wrote:

 
 If not, I will make a patch for DT_String to support this. The
 beneficial side affect would be that dtml-comment could be "fixed" so
 that its contents need not be parsable anymore, just like every other
 language I know of.

With your patch applied, will nested dtml-comment tags still work?

dtml-comment
   Some code commented out
 dtml-comment
   Documentation in a comment
 /dtml-comment
   Rest of code commented out
/dtml-comment

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] DTML block parsing

2001-01-23 Thread Casey Duncan

Steve Alexander wrote:
 With your patch applied, will nested dtml-comment tags still work?
 
 dtml-comment
Some code commented out
  dtml-comment
Documentation in a comment
  /dtml-comment
Rest of code commented out
 /dtml-comment
 
 --
 Steve Alexander
 Software Engineer
 Cat-Box limited
 http://www.cat-box.net

In present form no. It also does not support block continuation tags.

I will see what I can do about this.
-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`--

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] DTML block parsing

2001-01-23 Thread Casey Duncan

Casey Duncan wrote:
 
 Steve Alexander wrote:
  With your patch applied, will nested dtml-comment tags still work?
 
  dtml-comment
 Some code commented out
   dtml-comment
 Documentation in a comment
   /dtml-comment
 Rest of code commented out
  /dtml-comment
 
  --
  Steve Alexander
  Software Engineer
  Cat-Box limited
  http://www.cat-box.net
 
 In present form no. It also does not support block continuation tags.
 
 I will see what I can do about this.

OK, I have developed a new patch that almost completely fixes this
issue. In fact I am happier with it in general than my first patch.
There is only one flaw, although you can nest comments inside of one
another, and you can have any manner of broken dtml inside, if you open
another comment tag inside it, it must be properly balanced or you will
get a parse error. Here are some examples:

These do not generate errors with my new patch:
dtml-comment
dtml-if blah
/dtml-comment

dtml-comment
/dtml-with
/dtml-comment

dtml-comment
dtml-asdfsadf
/dtml-comment

dtml-comment
dtml-comment
Blah Blah
/dtml-comment
/dtml-comment

These do:

dtml-comment
dtml-comment
/dtml-comment

dtml-comment
dtml-if foo
dtml-comment
/dtml-if
/dtml-comment
/dtml-comment

I am a bit concerned that dtml-comment should ever generate errors at
all, but this is certainly an improvement. Anybody have any thoughts?
-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`--

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] DTML block parsing

2001-01-23 Thread Steve Alexander

Casey Duncan wrote:

 
 OK, I have developed a new patch that almost completely fixes this
 issue. In fact I am happier with it in general than my first patch.
 There is only one flaw, although you can nest comments inside of one
 another, and you can have any manner of broken dtml inside, if you open
 another comment tag inside it, it must be properly balanced or you will
 get a parse error. Here are some examples:

examples removed

 I am a bit concerned that dtml-comment should ever generate errors at
 all, but this is certainly an improvement. Anybody have any thoughts?

I'm very happy with the way you describe the patched tag works. I'll try 
it out when I return from the EuroZope meeting in Amsterdam.

I don't think it is reasonable to try to catch unbalanced dtml-comment 
tags. In fact, I like the fact that it will raise an error if I leave 
them unbalanced.

Thanks.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )