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

Document the difference between step-evaluated and pipeline-evaluated expressions #111

Closed
gimsieke opened this Issue Jun 12, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@gimsieke
Copy link
Contributor

gimsieke commented Jun 12, 2017

I haven’t found a piece of non-normative prose in the 1.0 spec or in the current draft where the distinction between step-evaluated and pipeline-evaluated expressions is explained, and that variable bindings/options of the surrounding pipeline are not available when, for example, p:string-replace evaluates its @match or @replace attributes. Maybe we should link to such a note from every attribute that is XSLTMatchPattern or XPathExpression.
I’d think that all @select, the p:viewport/@match, the p:when/@test and the p:namespaces/@element attributes (these are all occurrences of XSLTMatchPattern or XPathExpression in the 3.0 language spec) are supposed to be processor-evaluated while all patterns/expressions in the 3.0 step library (and any other step) are step-evaluated. A note should clarify that any bindings and XProc-specific functions are only available in processor-evaluated expressions / matching patterns.
By the way, Calabash doesn’t know bindings in p:viewport/@match and maybe other attributes of which I thought they should fall into the “processor-evaluated” category.

@gimsieke

This comment has been minimized.

Copy link
Contributor

gimsieke commented Jun 12, 2017

related to #101 and #66

@gimsieke gimsieke changed the title Document the difference between step-evaluated and pipeline-evaluated steps Document the difference between step-evaluated and pipeline-evaluated expressions Jun 12, 2017

@ndw

This comment has been minimized.

Copy link
Contributor

ndw commented Sep 15, 2017

The answers to these questions are in 2.7.2, but that section is fairly techncial. Add a note to the spec (somewhere, TBD) that describes this in less technical terms for the benefit of pipeline authors. Point out, for example, that the XPath extension functions (p:iteration-size, etc.) are not available inside steps (in an XSLT stylesheet, for example).

@ndw ndw self-assigned this Sep 5, 2018

@ndw

This comment has been minimized.

Copy link
Contributor

ndw commented Jan 6, 2019

I propose that the current §7.2.2 XPath in XProc is sufficient.

Objections?

@xml-project

This comment has been minimized.

Copy link
Contributor

xml-project commented Jan 7, 2019

No objections. For a technical document it pretty clear. As a pipeline author I am sure I will continue to make the mistake every once in a while.

@ndw ndw closed this Jan 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment