velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis <>
Subject Re: Whitespace, redux
Date Mon, 22 Apr 2002 16:08:13 GMT
The never-ending thread...

On Monday, April 22, 2002, at 04:34  pm, Geir Magnusson Jr. wrote:

>> This thread ran off limits and did not get a consensus of what the
>> "proper whitespace handling" (as Geir called it) is that could be
>> implemented in the parser and AST nodes. It seems that the notion of
>> what "proper" is seems to diverge (nobody direclty voted +1 for my
>> proposal, and some counterproposals showed up that did not get
>> any quorum either).
> That's understating it...

Sure. Soon we will see that preprocessors can turn random text into 
Velocity code :-)...

>> Well, if there is a majority that wants the "whitespace handling"
>> pluggable in a preprocessor, it would also solve my proposal if a
>> PlainTextPreprocessor or WhitespaceGobblerPreprocessor exists that
>> does my proposed handling (I offer to write it if Geir agrees to
>> take it into the core jar). To bad that the preprocessor pattern
>> will require its own parsing step to influence the content
>> (and thus have a performance impact).
> We can't even agree on what it's supposed to do. That's one 
> problem I have.
> I can see other solutions as well, but I don't want to invest too 
> much time
> if it's just going to be a different kind of wrong.

For me, the preprocessor is supposed to handle the data or text 
stream, to transform it and to relay it to the Velocity parser or 
another preprocessor.
The way a whitespace gobbling preprocessor modifies the input is 
another matter, and I support Christophe's proposal in this aspect 
as it is preferable to the status-quo. (ie. IMHO it handles 
whitespace better)

> I dunno.  Right now, the Directive+ seemed to me to just move the deck
> chairs around, rather than solve it, whatever 'it' is.  I have an 
> idea for
> another kind of xformation, and if we can get some consensus on 
> what this
> should be, I'll take a wack at that...

What kind of transformation is this? Ô please enlighten me :-)

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message