ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Koberg <...@koberg.com>
Subject Re: extended xslt task - use URIResolvers to create DependSet
Date Mon, 27 Oct 2008 16:51:46 GMT

On Oct 27, 2008, at 11:04 AM, Stefan Bodewig wrote:

> On Sun, 26 Oct 2008, Robert Koberg <rob@koberg.com> wrote:
>
>> * where is the DependSet being checked in the transformation(s)? I
>> can't find it :)
>
> Guessing, since I didn't follow the discussion: nowhere.
>
> <dependset> deletes the target files if it thinks they are outdated,
> so the way dependset factors into the transformation is by removing
> the target file and thus making it appear out of date WRT the source
> file.

OK, got it. So it sounds like a DependSet is not appropriate for this  
type of thing

>
>
>> * I will need to write to the file system to maintain the
>> cache. What would be a good way of handling this? Should I create a
>> directory in the baseDir for all transforms. Then a directory per
>> xslt task. Inside that dir create a properties file per transform?
>> How would you do it?
>
> Make it an attribute with some reasonable default (your descriptions
> sounds good, but how would you define "per xslt task"? use the
> stylesheet's name?).  See the <modified> selector for example.

The templates' URIResolver could work like the <modified> selector.  
But the transformer's URIResolver is different. Since it is at a per  
transform level it is not really the same (where the transform can  
happen over all XML files in some src dir).

I would love to use a properties implementation that allowed getting a  
subset of properties based on 'startsWith' see:
http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/AbstractConfiguration.html#getKeys(java.lang.String)

  ?? I did a search in the ant source and did not find  
'org.apache.commons.configuration'

Example props file:

main1.xsl.templates.import1.xsl = 6873gf43gf
main1.xsl.templates.include1.xsl = 7fg34gry

main1.xsl.transformer.mainSource1.xml.abc.xml = 823478fr87134
main1.xsl.transformer.mainSource1.xml.foo.xml = 1y83gf8734

(probably using paths in the key names ??)

So, for example,  
SomeImplOfAbstractConfiguration.getKeys("main1.xsl.templates") returns  
the keys to check for the templates recomplile and to perform the  
transform.


Is something like this available now in Ant? If not, would the commons  
configuration be OK as a dependency? I bet it would be useful in other  
places ??

Definitely open to ideas for this :)



>
>
>> * new class name TraxCachingLiason -- ideas?
>
> CachingTraxLiaison - but then again, all badly chosen names in Ant are
> mine (TM) ;-)

I used that name so it would show up next to TraxLiaison in the  
javadoc :)

thanks for your input,
-Rob


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


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


Mime
View raw message