Re: Here's a tricky one

/ Alessandro Vernet <avernet@orbeon.com> was heard to say:
| That part is fine, but what surprises me is XPath expression itself:
| "$p:episode". The step receives this as a string. When it evaluates
| that expression why would there be a $p:episode variable? This is not
| an XPath expression evaluated by the pipeline engine, but by a
| component. For this to work, the pipeline engine would need somehow to
| expose the state variables to the component, and the component to
| expose those states variables as XPath variables when evaluating XPath
| expressions.

Yes, Jeni just made that point too (as you point out in the end of this
message). I guess I've been expecting steps to be able to ask the
pipeline processor for information about the current state, but we
haven't explicitly stated that anywhere.

| First, if something like this happens, it needs to be said
| specifically in the specification of the relevant component.

Indeed.

| Which is
| not the case right now. Second, I don't like having state variables or
| options passed to components and exposed automatically as variables by
| components. I prefer this to be done explicitly. Either with
| parameters, or in this case by using a select so the expression is
| evaluated by the pipeline engine.

Yes, maybe it could have been done with a select. Maybe what I should
have written was:

  <p:option name="replace" select='concat("&apos;", $p:episode, "&apos;")'/>

I guess it's true that all of the state information we might want to
expose is constant for the duration of a particular step, so that will
work. It's a little cumbersome, but it's probably not the common case
anyway.

| This seems to be the same issue that Jeni discusses towards the end of
| this message:
| http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2007May/0170.html

Yes. And maybe I've changed my mind. In reply to her message, I said
that I thought we should expose them, but now I'm thinking maybe we
don't have to.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | It is good to have an end to journey
http://nwalsh.com/            | toward; but it is the journey that
                              | matters, in the end.--Ursula K. LeGuin

Received on Monday, 14 May 2007 13:39:25 UTC