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

Unexpected result with variable inside an <xf:bind> iteration #152

Closed
ebruchez opened this issue Apr 11, 2012 · 3 comments
Closed

Unexpected result with variable inside an <xf:bind> iteration #152

ebruchez opened this issue Apr 11, 2012 · 3 comments
Assignees
Milestone

Comments

@ebruchez
Copy link
Collaborator

Repro:

  1. Run https://gist.github.com/823402 in the XForms Sandbox
  2. Enter text in the 2 fields => the concatenation shows at the end of the line
  3. Click the "Insert" button => concatenation is shown as empty

Main issue is that we haven't properly determined what's the correct behavior in this case. Options:

  • lexical scoping, i.e. preceding::bind
  • same level or ancestor
  • any, similar to id resolution w/ repeat iterations (except binds don't have a current index)

Also, distinction between:

  • MIP accessing bind as variable
  • `bind/@ref`` accessing bind as variable (currently not supported at all)

Moved from:

http://forge.ow2.org/tracker/index.php?func=detail&aid=315833&group_id=168&atid=350207

@ghost ghost assigned ebruchez Apr 11, 2012
@ebruchez
Copy link
Collaborator Author

Checked that this is still broken now.

Notes from 2011:

  • implement better variable resolution strategy as discussed w/ Alex 2011-02-11
  • also check static analysis of expressions
  • issue: XFModelBinds.getVariables() is not implemented right
  • Q: what algorithm should be used to find variable?
    • A: find "closest bind", similar to id resolution w/ repeats
    • find common ancestor bind if any
    • use that as starting point
    • then drill down from there, use 1st branch if more than 1
  • enforce unicity of @name on binds within model

@ebruchez
Copy link
Collaborator Author

ebruchez commented Dec 3, 2013

This sample must work one this is fixed.

@ebruchez
Copy link
Collaborator Author

ebruchez commented Dec 4, 2013

Now documented.

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

No branches or pull requests

1 participant