蚂蚁XSLT任务输出到stdout [英] Ant xslt task output to stdout

查看:140
本文介绍了蚂蚁XSLT任务输出到stdout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用的< XSLT>在Ant任务,我怎么得到的输出生成到stdout?

Using the <xslt> task in ant, how do I get the output to generate to stdout?

我的XSLT是通过XSL生成多个文件:结果文档和正常输出,只是我想正常的Ant输出到显示状态信息。蚂蚁似乎逼我提供一个DESTDIR =或OUT =参数。

My XSLT is generating multiple files through xsl:result-document and the normal output is just status information that I'd like to show up with normal Ant output. Ant seems to force me to supply a destdir= or an out= parameter.

蚂蚁1.8.2与撒克逊9

Ant 1.8.2 with Saxon 9

推荐答案

是蚂蚁做到这一点。不过XSLT有您可以使用在标准输出得到输出的元件:)

Yes ant does this. However XSLT has the element which you can use to get output on the stdout :)

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:key name="types" match="a" use="text()"/>
<xsl:template match="/">
<result>
  <xsl:message terminate="no">I am a message from xslt!</xsl:message>
</result>
</xsl:template>
</xsl:stylesheet>

输出:

build:
 [xslt] Processing C:\Users\Stefanos\Documents\Visual Studio 2010\Projects\stackOverflow\stackOverflow\test.xml to C:\Users\Stefanos\Documents\Vis
ual Studio 2010\Projects\stackOverflow\stackOverflow\out.xml
 [xslt] Loading stylesheet C:\Users\Stefanos\Documents\Visual Studio 2010\Projects\stackOverflow\stackOverflow\test.xslt
 [xslt] I am a message from xslt!

BUILD SUCCESSFUL
Total time: 0 seconds

希望它帮助!

这篇关于蚂蚁XSLT任务输出到stdout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆