Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p:choose and p:if are inconsistent #825

Closed
ndw opened this issue Jun 29, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@ndw
Copy link
Contributor

commented Jun 29, 2019

In p:choose, we say that if no p:when is selected and there's no p:otherwise, nothing is written to any output port.

In p:if, we say that if the test expression is false, the step acts like an identity step on the default readable port.

That's inconsistent; I think we said that p:if is syntactic sugar for a p:choose with no p:otherwise.

I think p:choose should behave like p:if if there's no p:otherwise.

@xml-project

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2019

:+1

@gimsieke

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2019

Where do we say that about p:choose? In the current draft, as a consequence of issue #785 and PR #792, the behavior for p:choose with no p:when selected and no p:output is identity.

@xml-project

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2019

I think there is an internal inconsistency too in p:choose because at the beginning it says:

If there are no subpipelines for which the expression evaluates to true then, if a default subpipeline was specified, it is selected, otherwise, no subpipeline runs and an empty sequence appears on all of the outputs.

At the end there is another rule, cited by @gimsieke

@ndw

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

Right. So it's explicitly inconsistent in the spec and it's just an editorial oversight. I believe there's consensus on what we want the behavior to be.

@xml-project

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

👍

@ndw ndw self-assigned this Jul 11, 2019

@ndw ndw closed this in 4aa746e Jul 11, 2019

ndw added a commit that referenced this issue Jul 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.