ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob" <ja...@jfix.com>
Subject RE: xslt task - multiple files output - question
Date Mon, 12 Jan 2004 13:32:56 GMT
Jan,

> Use in="xml" style="xsl" and out="main.xxx".
> In the xsl you define the redirections.
> The Ants /etc/junit-frames.xsl:
>
[...]
>
>
> That´s exactly what Conor said [1].

agreed.  and yes, I saw this post, but how can I avoid an
"out" file at all?  all my output is indeed controlled by
the stylesheet.  At the moment, I am forced to supply an
outfile to the "out" attribute.  Unfortunately, I work on
Windows, so I can't send the ot file to /dev/null ...

Just to explain the purpose:  I am not creating HTML from
an XML source (where it may be convenient to create an
index.html on "out"), rather I am using ant/xalan to
fragment big XML document into smaller XML documents,
which can then be fed into a database ...

OK, in the end it seems acceptable to create a temporary
"foo.bar" file on "out" which is then deleted by the
"delete" task.

cheers,
Jakob.

>
> Jan
>
>
> [1]
> http://marc.theaimsgroup.com/?l=ant-user&m=107338755115331&w=2
>
>
>> -----Original Message-----
>> From: Jakob [mailto:jakob@jfix.com]
>> Sent: Monday, January 12, 2004 2:04 PM
>> To: user@ant.apache.org
>> Subject: xslt task - multiple files output - question
>>
>>
>> Hi,
>>
>> I searched the archive, and found some posts relating
>> approximately to my problem, but not entirely, and
>> without
>> solution.
>>
>> I have one input XML file, and want to use Xalan's
>> redirect extension to create a number of output files.
>>
>> So, theoretically, I would use the "in" and "destdir"
>> attributes, correct?  However, it seems they cannot be
>> used together.  Only the "in" and "out", and the
>> "basedir"
>> and "destdir" attribute pairs can be used together.
>>
>> I have tried mixing the "in" and "destdir", but in
>> this
>> case "in" is ignored, and "basedir" == "." is assumed.
>>
>> I also tried to use "basedir" and "destdir" (which in
>> my
>> scenario are the same), but now it converts the output
>> of
>> the transformation as well, as it works recursively.
>> ...
>>
>> So, currently I am using this rather inelegant
>> workaround
>> where I create a dummy outfile which is afterwards
>> deleted:
>>
>> <xslt
>>  style="${dir.preparation}/fragment.xsl"
>>  in="${dir.data}/${ed.ibc}/lof/in.xml"
>>  out="${dir.data}/${ed.ibc}/lof/foo.bar">
>>  <xmlcatalog refid="xml.catalog"/>
>> </xslt>
>> <delete file="${dir.data}/${ed.ibc}/lof/foo.bar"/>
>>
>> I do not like it, but it works.  I would be grateful
>> for
>> any suggestion as to how to make it more elegant.
>> Thanks
>> in advance.
>>
>> cheers,
>> Jakob.
>> --




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


Mime
View raw message