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

Different behavior of p:output on p:for-each / p:viewport #878

Closed
xml-project opened this issue Sep 17, 2019 · 2 comments

Comments

@xml-project
Copy link
Contributor

commented Sep 17, 2019

Is there a reason for the different rulings for p:output on these two steps? If so, please enlighten me, because I always fail to explain, why these two steps behave so differently.

If not: Do we want to harmonize them, so they behave in the same way? Or do you think its too late for this?

@ndw

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2019

A for-each can produce any number of outputs; if you don't specify any outputs, then you get an anonymous primary output if the last step in the subpipeline has a primary output port, just like other compound steps.

A viewport can produces one output: the input document as modified by the viewport subpipeline. If you don't specify any outputs, then you get an anonymous primary output if the last step has a primary output. It should be an error if the last step doesn't have one and there isn't an output specified.

Does that help explain the difference?

@xml-project

This comment has been minimized.

Copy link
Contributor Author

commented Sep 17, 2019

@ndw That is super helpful, thanks Norm. I will quote you on this if you do not mind.

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