ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dale Emery <dale@dhemery.com>" <d...@dhemery.com>
Subject Problem with style task's "includes" attribute.
Date Tue, 21 Jan 2003 23:17:17 GMT
Hello,

I'm having trouble with the style task's "includes" attribute.
It does what I expect when I translate one file at a time, like
so:

<target name="navigation">
    <style basedir="source" destdir="stage" includes="articles.html"
style="templates/navigation.xsl" />
    <style basedir="source" destdir="stage" includes="background.html"
style="templates/navigation.xsl" />
    <style basedir="source" destdir="stage" includes="consulting.html"
style="templates/navigation.xsl" />
    <style basedir="source" destdir="stage"
includes="helpful_hints.html" style="templates/navigation.xsl" />
    <style basedir="source" destdir="stage" includes="index.html"
style="templates/navigation.xsl" />
    <style basedir="source" destdir="stage" includes="links.html"
style="templates/navigation.xsl" />
    <style basedir="source" destdir="stage"
includes="presentations.html" style="templates/navigation.xsl" />
    <style basedir="source" destdir="stage" includes="training.html"
style="templates/navigation.xsl" />
    -->
</target>

When I use a pattern for the includes (*.html), it does odd
things.  Here's the target with the pattern:
<target name="navigation">
    <style basedir="source" destdir="stage" includes="*.html"
style="templates/navigation.xsl" />
</target>

The first time I run this target, ant correctly translates the
first file (articles.html), then chokes on the second
(background.html).

navigation:
    [style] Transforming into D:\My Documents\Writing\Web\test-xslt\stage
    [style] Processing D:\My
Documents\Writing\Web\test-xslt\source\articles.html to D:\My
Documents\Writing\Web\test-xslt\stage\articles.html
    [style] Loading stylesheet D:\My
Documents\Writing\Web\test-xslt\templates\navigation.xsl
    [style] Processing D:\My
Documents\Writing\Web\test-xslt\source\background.html to D:\My
Documents\Writing\Web\test-xslt\stage\background.html
    [style] : Fatal Error! java.lang.NullPointerException Cause:
java.lang.NullPointerException
    [style] Failed to process D:\My
Documents\Writing\Web\test-xslt\source\background.html


When I run it again, it translates background.html correctly,
then chokes on the next file (consulting.html).

navigation:
    [style] Transforming into D:\My Documents\Writing\Web\test-xslt\stage
    [style] Processing D:\My
Documents\Writing\Web\test-xslt\source\background.html to D:\My
Documents\Writing\Web\test-xslt\stage\background.html
    [style] Loading stylesheet D:\My
Documents\Writing\Web\test-xslt\templates\navigation.xsl
    [style] Processing D:\My
Documents\Writing\Web\test-xslt\source\consulting.html to D:\My
Documents\Writing\Web\test-xslt\stage\consulting.html
    [style] : Fatal Error! java.lang.NullPointerException Cause:
java.lang.NullPointerException
    [style] Failed to process D:\My
Documents\Writing\Web\test-xslt\source\consulting.html


When I run it again, it translates consulting.html correctly,
then chokes on the next file (helpful_hints.html).

navigation:
    [style] Transforming into D:\My Documents\Writing\Web\test-xslt\stage
    [style] Processing D:\My
Documents\Writing\Web\test-xslt\source\consulting.html to D:\My
Documents\Writing\Web\test-xslt\stage\consulting.html
    [style] Loading stylesheet D:\My
Documents\Writing\Web\test-xslt\templates\navigation.xsl
    [style] Processing D:\My
Documents\Writing\Web\test-xslt\source\helpful_hints.html to D:\My
Documents\Writing\Web\test-xslt\stage\helpful_hints.html
    [style] : Fatal Error! java.lang.NullPointerException Cause:
java.lang.NullPointerException
    [style] Failed to process D:\My
Documents\Writing\Web\test-xslt\source\helpful_hints.html

And so on.  If I run this enough times, it eventually translates
all of the files, one file per run.

Anybody have any idea what's happening, and what I can do to fix
it?

Thanks,
Dale



--
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