You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jeff Martin <je...@synamic.co.uk> on 2000/11/09 17:21:46 UTC

RE: style task

As far as I know at the moment the style task does not support this. It's
designed as more of a batch process for changing multiple files with a
single stylesheet.

I've been doing the same as you in calling the xalan processor using a java
call. This also has the advantage of allowing the -PARAM flag to be use to
pass parameters to the stylesheet.

It's defintly on my personal todo list to allow the style task work the way
you require but it ould be a while before I get to it. I don't know if
anyone else has plans to lok at this.

-----Original Message-----
From: Olivier Prouvost [mailto:olivier.prouvost@anyware-tech.com]
Sent: Thursday, November 09, 2000 10:52 AM
To: ant-user@jakarta.apache.org; ant-dev@jakarta.apache.org
Subject: style task



With Ant1.2 I've really a problem to use the style task.

I want to process an  'A.xml' file with 'S.xsl' style sheet, and to put
result in 'B.java' destination file.

with a simple call to xalan, it would be :   xalan -IN A.xml -XSL S.xsl
-OUT B.java

with ant, it becomes quiet complex :

<style basedir="." destdir="." extension="java" processor="xalan"
includesfile="A.xml" style="S.xsl" />

The output trace is :

    [style] Transforming into /home/olivier
    [style] Loading stylesheet /home/olivier/S.xsl

There is no way to put a simple destination file.  NOTHING is generated
anywhere...!  Where is my result file ?

The only way I found to bypass this problem is to call xalan with a
direct java call  writing it on 2 heavy lines....

Did anybody work on this problem ?

Thanks

--
------------------------------------------
          Olivier Prouvost
        Anyware Technologies
      Prologue 1 La pyreneenne
         31312 LABEGE CEDEX
Tel : 05 61 00 52 90 Fax : 05 61 00 51 46
------------------------------------------



Re: style task

Posted by Stefan Bodewig <bo...@bost.de>.
Jeff Martin <je...@synamic.co.uk> wrote:

> As far as I know at the moment the style task does not support
> this. It's designed as more of a batch process for changing multiple
> files with a single stylesheet.

You mean, you can't restrict it to just transform a single file using
patterns? What's the problem?

Stefan