ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Vanel <jmva...@free.fr>
Subject Ant to manipulate URL's and not only files ?
Date Sat, 24 Nov 2001 09:14:15 GMT
Hello

In XML Publication I use Ant as a top-level glue between several kinds of tools, mainly XSLT
transforms.
 The people on this list might be interested in this non-standard use of Ant, relying on these
tasks :
 - Apply
 - Get
 - Style
 - Java
 - Mkdir

In XML Publication the build.xml files are designed so that data can be URL, not only files.

Alas Ant is not yet enough Web-oriented, which is a paradox for a tool originating from the
Apache project =;)

For instance in <style> task the "basedir", "style" and "in" parameters could be HTTP
URL's, because XSLT processors accept URL's. This implies that Ant is able to treat an HTTP
directory like an ordinary directory, which implies :
    - get the content of an HTTP directory, whose HTML representation differs among HTTP servers,
( but at least Ant could understand Apache's directory output )
    - apply the same time-stamp criteria for re-making targets as for plain files

I looked at the source for the <style> task; for the simplest case, namely the "style"
and "in" parameters, this impacts several classes. But I can do it. But the utilily to have
URL's as input is very general in Ant. For instance the <java>, <copy> tasks could
take URL's input. This could take the form of <fileset dir="http://foo.com/myDir/">
, or a new <urlset> element . I would prefer the first, because I would like to use
an HTTP directory just like an ordinary directory. On the implementation point of
view, the Java platform has URL objects wich can be file: or http: or others, why not use
them in most places ?

The context:
============
XML Publication is a set of tools to generate Web pages from (possibly large) desktop documents
or other structured documents. It cuts big documents in Web pages, creates customizable multi-index.
All this is done through a repeatable process, where data is separated from presentation and
user settings.

If all inputs and stylesheets to XML Publication can be URL's (including build.xml !), this
means that the only thing to install is ant . The XSLT transforms can stay on a reference
Web site, the primary source documents and the user settings can be on other Web sites. So
we have a lot of flexibility, because all locations can be in properties being either files
or URL's.

The next stage for Ant would be to use FTP or WebDAV to manage also Ant outputs ... But this
is another debate!

--
Jean-Marc Vanel
jmvanel@free.fr
http://jmvanel.free.fr/ ===) CV, planning, software resources

Information et Document
http://perso.wanadoo.fr/idocw/index.html

XML Publication
http://wwbota.free.fr/XMLPublication/doc/index.html
http://XMLPublication.org

Worldwide Botanical Knowledge Base
http://wwbota.free.fr/


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message