我有一个XProc步骤,我希望输入源像这样工作:
-isource=foo.xml
在命令行上提供了URL,则该URL上的文档将用作源文档; default.xml
。是否可以在XProc中获得此行为?
答案 0 :(得分:1)
正如Florent在XProc mailing list上所建议的那样,在p:输入中使用p:文档可以正常工作。从外部指定其他内容只会覆盖它:
<p:declare-step version="1.0" xmlns:p="http://www.w3.org/ns/xproc"
name="main">
<p:input port="source">
<p:document href="default.xml"/>
</p:input>
<p:output port="result"/>
<p:identity/>
</p:declare-step>
使用以下命令运行:
calabash test.xpl
和
calabash --input source=myinput.xml test.xpl
看到差异..
HTH!