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

Inconsistency in spec of select attribute of p:input and p:with-input? #946

Closed
martin-honnen opened this issue Mar 1, 2020 · 2 comments
Closed

Comments

@martin-honnen
Copy link

@martin-honnen martin-honnen commented Mar 1, 2020

When I read in https://spec.xproc.org/master/head/xproc/#p.input about the select attribute

It is a dynamic error (err:XD0016) if the select expression on a p:input or p:with-input returns anything other than document nodes, element nodes, processing instruction nodes, comment nodes, text nodes or an empty sequence.

and then in https://spec.xproc.org/master/head/xproc/#p.with-input

If a document constructed by selection consists exclusively of text nodes, then it has a content type of text/plain, otherwise it has a content type of application/xml. If the selection result is a map or an array or an atomic value, it is a JSON document. It is a dynamic error (err:XD0016) if the select expression on a p:input or p:with-input returns attribute nodes or function items.

then it seems to me that the first quote prescribes an error (for any selection on p:with-input being not of the node types in the quote) while the second quote specifies that non-node values like map, array or atomic values are selectable, only attribute nodes or function items are not selectable.

Those two quotes seem to contradict each other in terms of the possible allowed types of selected values.

@gimsieke

This comment has been minimized.

Copy link
Contributor

@gimsieke gimsieke commented Mar 1, 2020

As one can imagine, the p:input wording predates the p:with-input wording. The latter has been amended when @xml-project addressed #702 and #832. We need to rephrase XD0016 for p:input/@select accordingly.

@ndw

This comment has been minimized.

Copy link
Contributor

@ndw ndw commented Mar 1, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.