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:with-option for option declared as static #543

Closed
xml-project opened this Issue Sep 19, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@xml-project
Contributor

xml-project commented Sep 19, 2018

Suppose the following pipeline snippet:

<p:declare-step>
  <p:declare-step type="inner:inner">
    <p:option name="static_option" static="true" select="5" />
    ...
  </p:declare-step>

  <inner:inner>
    <p:with-option name="static_option" select="xpath-expression" />
  ...

If I understand the concept of a static option right, I can not bind a static option using p:with-option, because the @select on p:with-option is dynamic.

In other words: A static option always has the value given with @select on p:option (unless the processor knows some way to change this called.)

Right? If not, what did I miss?

@eriksiegel

This comment has been minimized.

Contributor

eriksiegel commented Sep 19, 2018

Yes, right, as far as I understand

@xml-project

This comment has been minimized.

Contributor

xml-project commented Sep 19, 2018

Proposal:
Change

err:XS0031: It is a static error to use an option name in p:with-option if the step type being invoked has not declared an option with that name.

to

err:XS0031: It is a static error to use an option name in p:with-option if the step type being invoked has not declared an option with that name or the option is declared as static.

@eriksiegel

This comment has been minimized.

Contributor

eriksiegel commented Sep 19, 2018

Same error? Seems very different cases to me.

@xml-project

This comment has been minimized.

Contributor

xml-project commented Sep 19, 2018

@eriksiegel OK for me!

@ndw

This comment has been minimized.

Contributor

ndw commented Sep 20, 2018

👍

@ndw ndw self-assigned this Nov 1, 2018

@ndw

This comment has been minimized.

Contributor

ndw commented Nov 1, 2018

On second reading, I concur with Erik that it seems like a different case.

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