- From: Norman Walsh <ndw@nwalsh.com>
- Date: Tue, 07 Oct 2014 08:40:24 -0500
- To: public-xml-processing-model-wg@w3.org
- Message-ID: <878uks6lrr.fsf@nwalsh.com>
"Toman, Vojtech" <vojtech.toman@emc.com> writes: > I would say that an (p:)option cannot shadow another > (p:)option/(p:)variable, but that (p:)variable can shadow both > (p:)option and (p:)variable. Why the distinction? > Also note a small problem with the current wording ("its scope > consists of the sibling elements that follow its declaration and the > descendants of those siblings") and p:option. Consider the following > pipeline: > > <p:pipeline> > <p:option name="opt"/> > <p:pipeline type="..."> > <p:option name="opt"/> > ... > </p:pipeline> > ... > </p:pipeline> We have special rules for p:pipeline: Irrespective of the context in which the p:declare-step occurs, there are initially no option or variable names in-scope inside a p:declare-step. That is, p:option and p:variable elements can refer to values declared by their preceding siblings, but not by any of their ancestors. I don't think option shadowing is really a thing because there are no compound steps with options. This is the canonical example, I think: <p:pipeline> <p:option name="opt"/> <p:group> <p:variable name="opt"/> ... </p:group> ... </p:pipeline> > The nested p:pipeline (sibling of the p:option) has a descendant > p:option with the same option name. Obviously, this should work just > fine as there is no shadowing in this case, but one might get the > impression that this is not allowed. I thought this erratum was clear: http://www.w3.org/XML/XProc/docs/xproc-proposed-errata.html#e-13 But I could be wrong. Be seeing you, norm -- Norman Walsh Lead Engineer MarkLogic Corporation Phone: +1 512 761 6676 www.marklogic.com
Received on Tuesday, 7 October 2014 13:40:56 UTC