Re: What can a step implementation ask the pipeline processor?

Norman Walsh wrote:
> I think the spec should say "The [whatever we decide] are made available
> to steps evaluated by the pipeline".

Right. I think we need to state explicitly somewhere exactly what gets 
passed to steps. We currently say:

   The environment of such a step is its inherited environment with the
   standard modifications.

but I think this is talking about the environment used to interpret the 
element in the XProc document rather than the environment available to 
the component that actually executes the step.

So, I think we need to define what gets supplied to the component. This is:

  *  For each input port, the sequence of documents associated with that
     port.

  *  For each option, a string value.

  *  A set of namespace (prefix/URI) bindings based on the in-scope 
namespaces on the step element. (These MUST be used to interpret QNames 
passed as option values.)

  *  A set of variable (QName/string) bindings based on the in-scope 
options for the step. (These MAY be used to provide bindings for 
variable references in option values [and input documents?].)

  *  (anything else?)

The definition of each atomic step then needs to say how the variable 
bindings are used (if they are) by that particular atomic step.

Atomic steps that use a pattern (match option) will generally need to say

   when assessing a node against the pattern, the context is set as
   follows:

   * the set of variable bindings is the set of variable bindings
     supplied to the step
   * the function library is the core XPath function library, plus...
   * the set of namespace declarations is the set of namespace bindings
     supplied to the step

Atomic steps that use an expression (select option) will generally need 
to say

   when evaluating the expression, the context is set as follows:

   * the context node is ...
   * the context position is ...
   * the context size is ...
   * the set of variable bindings is the set of variable bindings
     supplied to the step
   * the function library is the core XPath function library, plus ...
   * the set of namespace declarations is the set of namespace bindings
     supplied to the step

Now, there are lots of atomic steps that use patterns or expressions, so 
  I think we probably want to put some of this in a central location, 
but the information about how options are interpreted goes with the 
definition of individual steps, not with the definition of XProc.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Tuesday, 22 May 2007 19:57:18 UTC