XSLT 可以在操作系统级别执行 shell 脚本吗? [英] Can XSLT execute a shell script at the OS level?

查看:56
本文介绍了XSLT 可以在操作系统级别执行 shell 脚本吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个生产流程,它在完成之前分大约 4 个步骤组合了 XSLT 和一些 shell 脚本.我现在手动执行每个步骤.

I have a production flow that combines XSLT and some shell scripts in about 4 steps before it reaches completion. I execute each step manually at the moment.

我在 Linux 中从命令行使用 Saxon 9.我可以让 xsl 的执行 shell 脚本..代替我吗?

I'm using Saxon 9 from the command line in Linux. Can I have the xsl's execute shell scripts.. instead of me?

(我知道我可以使用 Ant 或 Make 以另一种方式实现预期的结果......但如果这样做不是很费力的话,我更愿意留在 XSLT 中)

(I know I could achieve the desired result in another way with Ant or Make.. but prefer to stay in XSLT if it is not a huge effort to do so)

更新:我已经最小化了我的 shell 脚本并使用 Xproc 加快了速度.我对结果并不完全满意,但 Xproc 改善了生活.凯在下面的建议看起来不错..但我还没有尝试过.

Update: I've minimized my shell scripts and sped things up using Xproc. I'm not entirely satisfied with the result, but Xproc has improved life. Kai's suggestion below looks good.. but I have not tried it yet.

推荐答案

您可以像调用任何其他外部 Java 函数一样调用 java.lang.Runtime.exec().

You can call java.lang.Runtime.exec() in the same way as any other external Java function.

这篇关于XSLT 可以在操作系统级别执行 shell 脚本吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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