Re: Hiding dependencies in XPaths (Was: XProc Minutes 25 May 2006)

I think we may have a misunderstanding here.  I was considering (and
rejecting) something like this:

<p:pipeline>
  ...
  <p:step name="foo" type="whatever">
    <p:output name="output" label="foo-output"/>
    ...
  </p:step>
  ...
  <p:if test="$foo-output/name = 'smith'">
    ...
  </p:if>
  ...

where the XPath in the conditional is referring to an output of some
other step in the pipeline by using its label as a variable name.  This
means that the dependency of the conditional step on the "whatever"
step is only determinable by inspecting the XPath.  I think that's bad.

But if the idea is something like this:

  <p:if test="$test-input/name = 'smith'">
    <p:input name="test-input" ref="foo-output"/>
    ...

where the variables refer only to the step inputs, then I have no
objection.  The dependency is clear from the inputs.

A simple extension would be to say that the first input is available as
the context node, so that you don't have to use a variable if there is
only one input.

-- Richard

Received on Thursday, 1 June 2006 16:18:23 UTC