W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2008

Re: Variable and option binding proposal

From: Norman Walsh <ndw@nwalsh.com>
Date: Wed, 26 Mar 2008 10:23:05 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2k5jpmunq.fsf@nwalsh.com>
/ ht@inf.ed.ac.uk (Henry S. Thompson) was heard to say:
| As promised, a proposal for specifying how options and variables get
| bound [1].  I've done a fair amount of low-level rework to make the
| sub-sections about vars/opts/params consistent, but the major work is
| to tell the binding story in detail.
|
| 1) Syntax.  I think given the constraint on bindings for variables (no
|    pipes from sibling steps), we would do best to restrict variables
|    to the beginning of subpipelines.  I think we can do that in the
|    minimal way, by changing the _subpipeline_ pseudo-content-model to
|    be:
|
|  p:variable*,
|   (p:for-each|p:viewport|p:choose|p:group|p:try|
|    p:standard-step|pfx:user-pipeline |p:documentation|p:pipeinfo)*

I don't think that's a necessary restriction. There's no reason why I
shouldn't be able to initialize two or three variables right before
the p:choose that needs them.

| 2) Environment.  We need to put bindings back into the environment, see
|    2.5 [2] in the new alternate draft.

Why no mention of options in 2.5?

| 3) Existing references to 'in-scope options' etc. need to be changed
|    to reference the in-scope bindings.  For example, in both XPath1
|    and XPath2 versions of the Processor XPath context (section 2.6.1),
|    the In-scope variables/Variable values entry should read "The
|    in-scope bindings from the environment of the step."

Yep.

| 4) Slight modifications to 2.7 Variables:
|
|    'Variales' -> 'Variables'
|
|    "Pipeline authors can create variables to hold computed values."
|     -->
|    "Pipeline authors can create variables to hold computed values
|     using _p:variable_."
|
| 5) Slight modification to 4.7:
|
|    "standards steps" --> "standard steps"
|
| 6) Rework of 5.7.1 et seq. _p:variable_ and friends, see 5.7.1--5.7.4
|    [3] in the new alternate draft.

In 5.7.1, doesn't

...for the enclosing container, with the addition of bindings for all
p:variable elements which precede this p:variable within its surrounding...

have to read

...for the enclosing container, with the addition of bindings for all
p:option and p:variable elements which precede this p:variable within
its surrounding...

and similarly for p:option?

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Old age is the most unexpected of all
http://nwalsh.com/            | the things that happen to a man.--
                              | Trotsky

Received on Wednesday, 26 March 2008 14:23:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 26 March 2008 14:23:48 GMT