ant-dev mailing list archives

Hi,
I don't know if this is of interest, but I have made some custom tasks
and types for XSLT. (I would think these could be used to get a resource
from a jar) - for example:
- SourceType (have implemented a XmlDomType) - create a top-level DOM
(dom4j, JDOM, etc...) Document that can be used in multiple XSLT tasks.
The reason was to avoid reparsing a common XML file for multiple transforms.
- TemplatesType - create a top level Templates object that can be used
in multiple XSLT tasks. This type can also take a UriResolverType for
both the factory (resolves xsl:import/includes) and the transformer
(resolves document function calls)
- UriResolverType - can be assigned to a TemplatesType. I have
implemented a FallbackUriResolver which allows you to set a default
directory to look in first and if a file is not found, it falls back to
an alternate directory.
Additionally I have made a Lucene indexer and search type. The search
type can be assigned to a UriResolver where a can be used in the
document function (document('fieldName: matchValue')) and get search
results back as XML for use in the transform.
Of interest?
best,
-Rob
Matt Benson wrote:
> --- Antoine Levy-Lambert <antoine@gmx.de> wrote:
>
>> Hello Matt and others,
>>
>> I want to change the xslt task, so that the
>> stylesheet can be either a
>> regular file or a zip entry (or may be even any
>> resource).
>>
>> This brings me to point : we do not have yet a
>> syntax to generate
>> resources from attributes, do we ?
>>
>> My dream :
>>
>> <xslt in="somedata.xml" out="someresult.html"
>>
> styleresource="zip:file:foo/bar/my.zip!alpha/beta/style.xml"/>
>
> No! It was my dream first and you can't have it! :) I
> agree wholeheartedly. IIRC myself, Stefan, and
> probably others took part in a discussion of this
> nature some time ago... though I'm too frustrated by
> my slow home internet connection to find the thread
> ATM. Maybe we can get some momentum behind this. I
> think the simplest approach would be to default to
> file; but let the colon-delimited prefix represent a
> defined type in the project, e.g. file, url... and
> look it up. At the time I believe I was able to
> convince Stefan that this belonged in
> IntrospectionHelper; sounds like you agree.
>
> -Matt
>
>> which would mean of course take from foo/bar/my.zip
>> the entry
>> alpha/beta/style.xml and use it to transform
>> somedata.xml into
>> someresult.html.
>>
>> Any ideas ?
>>
>> Regards,
>>
>> Antoine
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org