- From: Conal Tuohy <conal.tuohy@gmail.com>
- Date: Tue, 26 Sep 2017 11:50:52 +1000
- To: Norman Walsh <ndw@nwalsh.com>
- Cc: XProc Dev <xproc-dev@w3.org>
- Message-ID: <CAErBQuTSw6uJmneVhZBWCjuVxPBc2Cip0nzvHGE2AEaQomNwvg@mail.gmail.com>
I totally agree that <p:for-each><p:with-input name="source"> is the way to go. The point of this change is to improve the language's usability by simplifying it and making it more syntactically consistent. So we can't introduce <p:with-input> for some step invocations and not others. Perhaps when a step has been declared to have exactly one input then you could invoke it using <p:with-input> without requiring a name, but such a shortcut would have to be available consistently across all steps, not just <p:for-each>. In any case, <p:for-each>'s input should have a defined name anyway, so you could always refer to it by name if you wanted to. Conal On 23 September 2017 at 18:22, Norman Walsh <ndw@nwalsh.com> wrote: > > So…is the input to p:for-each defining an input with either a name (an > arbitrary name?) or no name, or is it connecting something to an input > with either a name (an arbitrary name?) or no name? > > 1. <p:for-each> > <p:input>…</p:input> > > 2. <p:for-each> > <p:input name="source">…</p:input> > > 3. <p:for-each> > <p:input name="anythingIwant">…</p:input> > > 4. <p:for-each> > <p:with-input>…</p:with-input> > > 5. <p:for-each> > <p:with-input name="source">…</p:with-input> > > 6. <p:for-each> > <p:with-input name="anythingIwant">…</p:with-input> > > I think it’s probably easier to explain as p:with-input, so I think I > favor 4, 5, and 6 over 1, 2, and 3. I don’t think option 6 makes any > sense. > > Option 4 is appealing because there can be only one input and its name > is irrelevant. But it introduces a new class of with-input tag: an > anonymous one. Is the small savings in typing worth the cognative load > of a new kind of thing? > > Option 5 is therefore the simplest and most consistent thing, I think. > > Be seeing you, > norm > > -- > Norman Walsh > Lead Engineer > MarkLogic Corporation > Phone: +1 512 761 6676 > www.marklogic.com > -- Conal Tuohy http://conaltuohy.com/ @conal_tuohy +61-466-324297
Received on Tuesday, 26 September 2017 01:51:37 UTC