Jon Stevens wrote:
>
> on 10/3/2000 7:55 AM, "Rolf Veen" <[EMAIL PROTECTED]> wrote:
>
> > Just another idea. In our template engine we use standard extensions (*.htm,
> > *.txt, *.xml) so that the engine can return the corresponding MIME type. The
> > focus is on the base language (text / HTML / XML ...), not on the template
> > language. That is very usefull, at least in our case: we can return a
> > text/plain document for example. Mapping is done by putting templates in
> > specific directories. This is not incompatible with a specific file
> > extension; just put the right mapping in web.xml.
>
> That doesn't make a lot of sense here in this case given that mime type is
> not determined by the server, it is defined by the application. For example,
> a .vt/.vm/.wm file could easily return *anything* that falls under any mime
> type.
>
> I also have a problem with this because if we ever have an IDE for Velocity,
> then in a GUI environment I want my users to be able to double click on the
> file and have it open in the IDE.
Since velocity is a template language in most cases it is secondary to
the "host" language.
And it makes much more sense to me to edit vel templates for HTML files
in HTML editor, templates for Java sources in java editor and sql
templates in sql editor so I get the proper highlighting etc. Amount of
velocity code itself is usually relatively small.
> I also have a problem with this because I don't like the idea of overloading
> suffix based mime types. A .vt/.vm/.wm file is NOT a .html file even if it
> only returns .html after having been processed. Another example of this is
> that you don't have a .xml as a .html file.
the difference here is that xml is not a template. You should be rather
taking XSL as an example in this case...
>
> So, I vote -1 on the above
> and I vote +1 on changing it to .vt AFTER an
> analysis is done of any other suffixes that match .vt. I don't want to run
> into the WebMacro problem of .wm == Windows Media Format...LOL.
;-)
Anyway I do not think this is something we need to worry about. Velocity
can process templates with any extension so it's up to everyone how to
name them and either way is legal. As for Velocity's own extension I am
pretty happy with both .vm and .vt, what about .vel btw?
fedor.