Re: Proposal for changing choose/when/otherwise

/ Jeni Tennison <> was heard to say:
| I'm very much in favour of making the syntaxes of
| p:choose/p:when/p:otherwise, p:for-each and p:viewport consistent with
| each other. But, as I've argued before [1], I think that this should
| be done by changing p:for-each and p:viewport so that the
| (((step,source)|href),select) attributes appear on those elements,

That's the other way of doing it.

| rather than a separate <p:input>. A <p:input> is still needed to
| specify the name of the source that's visible to the steps within the
| <p:for-each> or <p:viewport>.

The fact that you need *both* the p:input and the attributes on the
main element (or some other attribute to name the port) is one of the
reasons I prefer to normalize in the other direction. The other reason
is because moving the attributes up makes it impossible to use "here"
documents as input. Granted, it's not necessary or even obviously
useful, but it seems odd to hamper constructs in this way.

| Conversely, giving <p:when> a <p:input> that specifies the context of
| the test on the <p:when> seems really confusing to me. It also leads
| one to think that there is a new source visible within the contained
| steps of the <p:when>/<p:otherwise>, but I don't think that's meant to
| be the case.

The p:when case is certainly the clumsiest part of doing it the way I
proposed. And I think it probably does make a new input visible inside
the p:when, but since we've agreed that *all* of the outputs that are
in scope can be referenced from inside the p:when, I don't think this
makes any difference.

                                        Be seeing you,

Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Monday, 23 October 2006 17:31:36 UTC