ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Wolfgang Hujer <Christian.Hu...@itcqis.com>
Subject Remembering what files have been validated for xmlvalidate task
Date Fri, 31 May 2002 11:35:54 GMT
Hello dear ant users,

I am often using validation of source- or generated files using Ant like this:

<project default="validateDest" basedir=".">
    <!-- ... -->
    <target
        name       ="validateSource"
        description="Validiert die Quelldateien."
    >
        <xmlvalidate warn="no">
            <xmlcatalog refid="generalcatalog" />
            <fileset dir="${source/htdocs}">
                <include name="**/*.html"/>
            </fileset>
        </xmlvalidate>
    </target>

    <target
        name       ="transform"
        description="Generiert die HTML-Dateien."
        depends    ="validateSource, update, init"
    >
        <style
	    basedir="${source/htdocs}"
	    destdir="${dest/htdocs}"
	    style="${source}/tools/transform.xsl"
	    includes="**/*.html"
	>
            <xmlcatalog refid="generalcatalog" />
        </style>
    </target>

    <target
        name       ="validateDest"
        description="Validiert die generierten Dateien."
        depends    ="update, transform"
    >
        <xmlvalidate warn="no">
            <xmlcatalog refid="generalcatalog" />
            <fileset dir="${dest/htdocs}">
                <include name="**/*.html"/>
            </fileset>
        </xmlvalidate>
    </target>
</project>

There's a speed problem when doing this.  The files are always validated, wether they have
changed or not.  I think the <xmlvalidate/>-task should get the ability of caching /
remembering what files already have been validated, including their time stamps or hash code,
to detect wether a file needs or needs not validation.

What do you think?


Greetings and have a nice week end.
-- 
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
ITCQIS GmbH
Telefon: +49 (089) 27 37 04 37
Telefax: +49 (089) 27 37 04 39
E-Mail: mailto:Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/


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


Mime
View raw message