Re: Variable and option binding proposal

/ 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 UTC