- From: Norman Walsh <ndw@nwalsh.com>
- Date: Fri, 11 May 2007 14:17:03 -0400
- To: public-xml-processing-model-wg@w3.org
- Message-ID: <87odkr8bts.fsf@nwalsh.com>
/ Alessandro Vernet <avernet@orbeon.com> was heard to say:
| On 5/11/07, Norman Walsh <ndw@nwalsh.com> wrote:
|> One consequence of using variables instead of functions for the state
|> information ($p:episode and friends) is that they potentially conflict
|> with the names of options.
|
| I have seen that there was a straw poll during the last call which got
| us 2 for functions against 3 for variables and 1 abstention. I
| understand the need for making progress, but it looks like we have not
| reached a consensus on this one.
There didn't seem to be any disagreement that we wanted the
functionality, the only question was how we wanted to expose it. With a
marginal preference for variables, I believe we did achieve consensus to
proceed that way, with a specific request for user and implementor
feedback.
| (V) For variables: (1) With some XPath APIs, hooking a function
| handler is more complex than passing the value of a variable.
|
| (F) For functions: (1) Extending XPath with function done more
| frequently in W3C standards (e.g. XSLT, XForms). (2) Unless the API
| provides a way to pass a call-back to get the value of a variable,
| using variable might be less efficient in the cases where there are a
| number of variables to declare, as a structure with the name and value
| for each variable will need to be passed.
In practice, for the state information, there will never be more than
n+2 variables where "n" is the nesting depth in compound steps, so I
doubt this burden will ever be very large.
| (3) Like Norm noted, there
| is a potential conflict with pipeline state variables which means we
| need to create an additional rule to prevent the conflict.
|
| My bias: with all the XPath API I used so far (jaxen, Saxon, JAXP),
| declaring a function or a variable is of equal complexity. So I
| haven't experimented (V1), and this only leaves me with arguments for
| functions.
|
| Is this all there is? Are there other reasons we want to use variables
| when others use functions?
No, I don't think so. I was mildly surprised during the call that the WG
didn't find (F1) in favor of functions more persuasive.
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | Many ideas grow better when
http://nwalsh.com/ | transplanted to another mind than in
| the one where they sprang up.--Oliver
| Wendell Holmes
Received on Friday, 11 May 2007 18:17:13 UTC