xsl-list
[Top] [All Lists]

Re: [xsl] ant task

2010-06-02 13:58:47
Thank you Michael, Michael and Andrew for all the suggestions and also
for providing the code. I did not know about Kernow either. Look
forward to getting it all together.

I am using SaxonHE for now. I will see if I can get collection() to
work as well.

Best regards.

monosij

On Wed, Jun 2, 2010 at 4:13 AM, Andrew Welch 
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> wrote:

...the collection() function along with the essential
saxon:discard-document() for anythig more than a small set.

Alternatively, to transform lots of input files with a single stylesesheet
then use Kernow, either through the GUI or ant.


On 2 Jun 2010 at 00:17, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:

On 01/06/2010 23:49, Monosij Dutta-Roy wrote:

I am using XSLT / Saxon 9.2 from Ant (using Saxon9-ant) to apply
transforms.
I want to the use fileset task in ant to apply the XSLT to a set of
files in a directory.

Wanted to find out if there would be some examples of this. I am
thinking I need to:
1. send in a value for the 'in' param in the saxon-xslt task.
2. send in a parallel value for the 'out' paramter or modify the 'out'
parameter according to the name of the file.

My calls from Ant are working fine - just need to apply the transforms
to a set of files in a directory. If there is another approach to the
above please let me know.


Firstly, I don't recommend using the Saxon Ant XSLT task. Use the standard
XSLT task instead, specifying Saxon (net.sf.saxon.TransformerFactoryImpl) as
the JAXP transformer factory. Two reasons (a) it was never possible to test
the Saxon task thoroughly enough, because there's no test suite available,
so many regression bugs were introduced inadvertently, (b) the original
justification for it has disappeared, since everything you might want to
control in the transformation (e.g. initial template name, initial mode, etc
etc) is now available through properties on the JAXP factory which the
standard task can set.

That then leaves your question about applying the transformation to a set
of files. I'm afraid that's something I haven't attempted to do at the ant
level. It's easy enough to do it at the XSLT level by processing a
collection().

Regards,

Michael Kay
Saxonica

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>