Re: Defaulting

/ Alessandro Vernet <avernet@orbeon.com> was heard to say:
| When a component has multiple outputs, if the pipeline author does not
| specify any of the output to be the default (or doesn't specify the
| outputs at all), can the component define which one is the outputs is
| the default? According to what I see in the specification, the answer
| to that question is "no". Is this intentional?

For components declared with p:declare-step-type, I think the answer
should be yes.

For things like for-each and group, there's no where to hang the
declaration so you don't get a default if (a) the component has more
than one output and (b) you don't specify one of them as the default.

But there wasn't WG consensus last week to allow default in those
cases. Someone pointed out that specifying the default in those cases
was no less work than simply using the name on the next step.


| If the answer to that question is "yes" and we have a consensus on
| this, I think that this next point becomes irrelevant.
|
| ---
|
| In section 4.2.3, I read:
|
| "It is a static error to identify two different ports as the default.
| It is also a static error if the component on which this declaration
| appears has exactly one output and that output is marked as not being
| the default."
|
| Should it also be a static error if the component on which this
| declaration appears has more than one output and none of the outputs
| is marked as being the default? If we answer yes to this question,
| those 3 rules could be summarized as:

No, I don't think you should have to specify a default. If you don't,
there isn't one and the pipeline author always has to name them.

| For components that have one or more outputs, it is a static error if
| no output or more than one outputs are marked as default.
|
| ---
|
| Still in 4.2.3 the <p:output> used in a construct doesn't specify the
| "default" attribute. Is this intentional? If we allow the "default"

I don't think there was consensus on this point.

| attribute there as well, when <p:output> is used in
| <p:when>/<p:otherwise>, should we enforce the same port name to be
| marked as the default across branches?

It's not immediately obvious to me that we need to do that. But I
don't feel strongly about it one way or the other.

| Finally, I think that defining "default input" in the glossary would help.

Yes.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Thursday, 8 February 2007 14:42:57 UTC