Friday, April 19, 2002, 5:44:47 PM, Christoph Reck wrote: > "Geir Magnusson Jr." wrote: >> >> On 4/19/02 11:05 AM, "Daniel Dekany" <[EMAIL PROTECTED]> wrote: >> > No, I would really hate those flags. In my proposal vm calls was NOT >> > directives, so read the ENBF with Directive+ as such. BTW I have >> > changed my mind. What about that the only think that gobbles >> > whitespace is: #if, #else, #elsif, #end, #set, #foreach, #stop, #macro >> > and comments (note that I have omitted #include and #parse). >> > Everything else prevents whitespace gobbling in its line. So instead >> > of Directive+ I say WhiteSpaceGobbler+. > > With flags i meant something within the AST nodes for the directives, > which you will just the same need if you want to mark the above > list as gobbling...
You know the list of whitespace gobbler directives on compile time so it is really simple. What would be complicated, say, if we have a mechanism to flag user defined vm-s (gobble whitesapce or not to) or if we allow users to specify which directive gobbles whitespace but this is not the case here. >> >> Doesn't this just keep the problem but move it around a bit? As we know there is no ultimate solution even if we assume that we have HTML templates only (which is not the case). I only say that it is far better than the current rule, and also it is IMO somewhat better than the rule with "Directive". But read on... > So it seems to me. > > How do you avoid leading whitespaces from indented comments? If you look into the list of whitespace gobblers (WhiteSpaceGobbler+) then "comments" are there. But read on... > This is why I wanted it to be "Directive" without that "+", which [snip >:)] This debate just does not worth the bandwidth/time (I think many subscriber will agree). As I'm responsible for this cascade (again...) I would like to stop it here. So let it be "Directive" if you like it. This is somewhat matter of taste. Instead, IMO it would better to concentrate on the other subthread (OK, that was started by me too... sorry): No whitespace gobbling in the core, and add pluggable template preprocessors. No backward compatibility problems, no pollution of the core by application specific behavior (and miss-design... /-:), allows application/taste specific whitespace gobbling, and adds other functionality eg.: override default encoding (chatset) based on the content (<?xml ... encoding="..."?>), allows JSP-tag-like syntax, allows application specific escaping rules (IF we ever add #echo and allow #echo-ing non-visual characters...), etc. So if we would agree in it (no w.s. gobbling etc) then we could look into the pluggabe preprocessor proposal, and then everybody can use his/her favorite whitespace eater method. OK, a "standard" preprocessor for HTML/XML is still needed, and then let it be the Christoph Reck whitespace gobbler then, and implement that as a preprocessor. Anybody disagree with the Christoph Reck whitespace gobbler? -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
