ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@binarix.com>
Subject [PATCH] valueFile for ReplaceFilter
Date Mon, 23 Apr 2001 08:02:43 GMT
Came across the need to replace tokens within files with the content of
another file, so I've produced a little patch for Ant.

The reasons for this patch are:

- although there is multi line replacetoken/replacevalue functionality
in ant, the actual tokens/values have to be specified within the build
file
- same problem with the properties file: properties file contains also
something other than the actual content that needs to replace the token

Here is the history of it:

My web sites are built using XSLT from the source XML files and XSL
stylesheets into XHTML. Ant facilitates the build via the style task.
However, there is the need to have certain site-wide files (ie. menus)
that are also XML but it is quite unclean to cut and paste them into the
actual source XML files, not to mention a huge mess when the number of
files are big. Placing the menus into the style sheets is even worse,
it's mixing style and data. At the same time, those menu files have to
be available as is because a web publishing system is plugged into the
whole thing and modifies the menus when the site is changed. After the
modification, ant builds the whole site, be that manually or
automatically.

So, in my case, this patch enables placement of XML files (well, their
well-formed fragments, really) within other XML files which are later
processed into HTML using XSLT.

If this makes any sense to any of you, feel free to use the attached
patch.

Bojan
Mime
View raw message