ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Need help with REPLACING an SSI directive
Date Thu, 30 Apr 2009 19:14:17 GMT
I'm trying to figure out exactly what you need. You want to *insert*
the file the ServerSide Include is referring to instead of using
Server Side Includes?

I would think Ant would be an overkill in this case. A simple Perl or
Python script would do exactly what you want and shouldn't take long
to do.

The filter is mainly for replacing strings and not including whole
files into other files.

On Thu, Apr 30, 2009 at 2:54 PM, xak <zfrazier@vsapartners.com> wrote:
>
> First off, I am very new to using ANT and I'n not a Java developer but my
> needs are very simple ...
>
> I am creating a web site that is decently large but it must be static. So
> I'm thinking that I can develop the site locally using server-side includes
> to avoid hardcoding all the navigation, etc. and then "publish" the site
> using ANT where all the SSIs are replaced with the actual file contents.
>
> Replacing a token is easy enough but I don't know how to "regex" the comment
> syntax of the SSIs. Is that even the right approach? Can I use replace or do
> I need something else?
>
> This is in the SSI syntax in the HTML:
>  <!--#include file="_includes/_html_head_open.html" -->
>
> I need to replace with ${html.head.open} as defined below:
>   <loadfile property="html.head.open"
> srcFile="${src}/_includes/_html_head_open.html" />
>
> So I need something like this where the token is the SSI:
>   <replace dir="${output}" token="@html.head.open@"
> value="${html.head.open}" />
>
> The most important thing here is to be able to develop the source files,
> view them in the browser and then only at the end do a publish build where
> the SSIs are replaced. That's it.
>
> I know there are ANT tasks out there to turn various template markup into
> HTML but that is overkill for my needs.
>
> Any assistance will be greatly appreciated.
>
> Zack
> --
> View this message in context: http://www.nabble.com/Need-help-with-REPLACING-an-SSI-directive-tp23322263p23322263.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message