Re: Parameters

Toman, Vojtech writes:

>> There's only _one_ point at which parameter maps get created and bound
>> to names, and that's at the entry to the whole XProc engine, i.e. on
>> the command line as per Norm's example
>> 
>> >>        calabash -p foo=bar -p other:foo=baz -p struct=@foo.xml
>> >>
>> >>    might create two maps. One, named '', containing two keys, 'foo'
>> >>    and 'struct' initialized respectively to the values "bar" and the
>> >>    XML document in foo.xml. The second, named 'other' containing a
>> >>    single key mapping 'foo' to "baz".
>> 
>> or via some mechanism in a XProc example's API.
>
> So given the above example, how does the pipeline user know that he
> has to use the name "struct"? Is that declared in any way in the
> pipeline? I guess I still don't see that bit.

So by pipeline user, do you mean the person typing the command line?
If so, it's the same way s/he knows today to write 

  calabash . . . -p struct=@foo.xml 

S/he does it because the documentation of the pipeline says that
there's an xslt step in the pipeline with 'struct' as a param.

And, to carry on the example, that there's a _different_ xslt step
whose parameters are set from the 'other' parameter map, which has a
foo param.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

Received on Thursday, 20 February 2014 16:40:45 UTC