velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Hoffmann <>
Subject Macro Defs with HTML-Editor
Date Sat, 24 May 2003 09:28:00 GMT

to be able to write VelociMacros using a HTML-WYSIWYG-editor I need a 
way to extract only macro definitions from a HTML source. See the 
following example:

---[ A.vm ]----------------
<good stuff 1>
<good stuff 3>

---[ B.vm ]----------------
<bad stuff 1>
#macro ( goodStuff )
<good stuff 2>
<bad stuff 2>


Compiling B.vm will give
<bad stuff 1>
<bad stuff 2>
<good stuff 1>
<good stuff 2>
<good stuff 3>

What I call <bad stuff> is HTML added by the editor e.g. the 
<head>...</head> part.

Has somebody got an idea how to supress the output of these <bad stuff> 
fragments? It would be nice to tell velocity "parse this file (B.vm in 
this case), but ignore anything outside the velocity directives".

Or does somebody know of a kind of preprocessor to extract the velocity 
directives from a file?

Graceful for any hints.

Regards Dirk

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

View raw message