Ant's XSL only checks the primary XSL file for changes (and the source XML - not xi:includes or file entities). It does not parse that XSL to find xsl:import/includes to check if they have changed.

You could put the import/includes in the primary XSL or use force=true on the xslt task.

best,
-Rob


On Oct 16, 2008, at 2:09 PM, Marijan (Mario) Madunic wrote:

(Using ANT 1.7.1 on a Windows XP SP3 machine)

Sorry about the not to obvious subject line but I'll do my best in explaining the problem I've been having.

I'm using ant to pipeline a series of transforms on content extracted from a db.

There is one main XSLT that does the bulk of the transforms. It's built using called templates. Here it is in ANT:

<echo>fixArtistType.xsl</echo>
<xslt in="../doNotDelete/keep.xml" out="../temp/deleteMe.xml" style="../xslChunks/fixArtistType.xsl" />

<echo>fixCountries.xsl</echo>
<xslt in="../doNotDelete/keep.xml" out="../temp/deleteMe.xml" style="../xslChunks/fixCountries.xsl" />

<echo>getArtists.xsl</echo>
<xslt in="../doNotDelete/keep.xml" out="../temp/deleteMe.xml" style="../xslChunks/getArtists.xsl" />

The last one is the main XSLT transform. I am overwriting the output doc as I don't need it. I use it keep.xml as a dummy doc as I parse a series of other XML docs to get my desired output.

What is happening is that even though I make changes to the called templates that getArtists.xsl uses I get the following

G:\XML\cdCollection>step2

G:\XML\cdCollection>ant -f G:\XML\cdCollection\antTasks\getArtists.xml
Buildfile: G:\XML\cdCollection\antTasks\getArtists.xml

main:
   [echo] fixArtistType.xsl
[xslt] Processing G:\XML\cdCollection\doNotDelete\keep.xml to G: \XML\cdCollection\temp\deleteMe.xml [xslt] Loading stylesheet G:\XML\cdCollection\xslChunks \fixArtistType.xsl
   [xslt] START fixArtistType
   [xslt] END fixArtistType
   [echo] fixCountries.xsl
   [echo] getArtists.xsl
 [delete] Deleting directory G:\XML\cdCollection\temp

BUILD SUCCESSFUL
Total time: 0 seconds

When I make a change to the getArtists.xsl directly the total time is 15 seconds and I usually get the output I expected, but now I don't. The funny thing was if I added a space to the getArtists.xsl anywhere I usually get the output I expected. I used to be able to halt this by deleting all temp files, moving the result files to a location on a server. In other words have a clean structure every time I ran an ANT process. This all runs fine when using Saxon from the command line minus ANT but don't want to really go that route.

So my questions are: Is ANT checking for a cached result set? Does it check the files it is to use for the transform and check if they are different from a cached set? How do I stop this behaviour?

Any help would be appreciated.

Thanks

Marijan (Mario) Madunic

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to