W3C home > Mailing lists > Public > xproc-dev@w3.org > March 2014

Re: Source port with default fallback value?

From: Florent Georges <fgeorges@fgeorges.org>
Date: Wed, 26 Mar 2014 15:03:13 +0100
Message-ID: <CADyR_r0OZ8gaDJ2EJc7CdVZX47broBWUZ0DGvsXxNjVSE4ZRqA@mail.gmail.com>
To: Gioele Barabucci <gioele@svario.it>
Cc: XProc Dev <xproc-dev@w3.org>
On 26 March 2014 14:32, Gioele Barabucci wrote:

  Hi,

> * if a URL is provided on the command line using `-isource=foo.xml`, then
> the document at that URL is used as the source document;
> * if no URL is provided, then the document `default.xml` should be used.

  Unless I forgot something obvious, you can simply declare the input
port with a document, and if you set one on the command line, it will
override it:

    <p:declare-step version="1.0">
       <p:input port="source">
          <p:document href="default.xml"/>
       </p:input>
       ...
    </p:declare-step>

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
Received on Wednesday, 26 March 2014 14:04:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:12 UTC