2014-03-25 3 views
0

나는 다음과 같이 작업 내가 입력 소스를 좋아하는 것 인 XProc 단계가 : URL이 -isource=foo.xml을 사용하여 명령 행에 제공되는 경우기본 폴백 값이있는 원본 포트?

  • , 그 URL에서 문서가 원본 문서로 사용된다; URL이 제공되지 않으면 default.xml 문서를 사용해야합니다.

XProc에서이 동작을 얻을 수 있습니까?

답변

1

Florent가 XProc mailing list에 제안한대로 p : input 내부의 p : 문서를 사용하면 기본값으로 잘 작동합니다. 외부에서 뭔가를 지정하면 간단히 무시 :

calabash test.xpl 

와 :와

<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 --input source=myinput.xml test.xpl 

차이를 볼 수 ..

HTH!