I have an XProc step where I would like the input source to work like this:
- 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.
Is it possible to obtain this behaviour in XProc?
As suggested by Florent on the XProc mailing list, using a p:document inside the p:input works just fine as a default. Specifying something else from outside simply overrides it:
Run it with:
and:
to see the difference..
HTH!