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

Scoping of static variables and options #473

Closed
xml-project opened this Issue Jul 27, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@xml-project
Copy link
Contributor

xml-project commented Jul 27, 2018

On yesterdays call we agreed to the following rule, proposed by @ndw:

[...] a simple rule: only static references
within the attributes and descendants of p:input, p:output, and other
variables and options declared to be static.

I think thats a clear story to tell, however we need to add some further explanation:

Consider:

<p:declare-step>
  <p:option static="true" name="uri" select="'http://some-uri'" />
  <p:input port="source" href="{$uri}" /> <!-- it is clear, that this should work -->

  <p:declare-step type="foo:bar">
    <p:input port="source" href="{$uri}" />  <!-- (2) -->
</p:declare-step>

Does foo:barinherit the static scope (variables and options) of the outer step, viz. is (2) valid?
I think it should be and I see no obstacles to it. IMHO we should says something about the scope of static variables/options. Currently we just say

The in-scope bindings are limited to the lexically preceding, statically declared options and variables.

@ndw

This comment has been minimized.

Copy link
Contributor

ndw commented Jul 27, 2018

I agree, (2) should be valid. There's no reason that static bindings can't be visible inside child p:declare-step elements. The same is true of static preceding p:variables in a p:library, one assumes.

@xml-project

This comment has been minimized.

Copy link
Contributor

xml-project commented Jul 27, 2018

The same is true of static preceding p:variables in a p:library, one assumes.

I would expect this too.

@xml-project

This comment has been minimized.

Copy link
Contributor

xml-project commented Jul 30, 2018

see issue #454

@xml-project

This comment has been minimized.

Copy link
Contributor

xml-project commented Dec 8, 2018

Could somebody please remind me what to do here (and/or a why this issue was assigned to me).

@xml-project

This comment has been minimized.

Copy link
Contributor

xml-project commented Dec 21, 2018

Since no one seem to remember what to do here. Close it and see, if it pops up again?

@ndw

This comment has been minimized.

Copy link
Contributor

ndw commented Dec 23, 2018

Sure.

@ndw ndw closed this Dec 23, 2018

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