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

Submission: option to clear non-relevant data #1179

Closed
ebruchez opened this Issue Aug 5, 2013 · 10 comments

Comments

Projects
2 participants
@ebruchez
Collaborator

ebruchez commented Aug 5, 2013

Form Runner doesn't prune non-relevant data upon save, because this removes information (structure of the document) which means FR can't read back that data properly. So right now we keep non-relevant data.

NOTE: On the other hand the send action has an option to prune data.

Instead, this issue suggests a new option to blank non-relevant data.

  • xf:submission: new parameter or value, suggesting relevant="prune|keep|blank" and deprecate true|false
  • need an option for the Form Runner save action (#3152)
@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez Apr 26, 2014

Collaborator

Naming: could be blank or clear.

Collaborator

ebruchez commented Apr 26, 2014

Naming: could be blank or clear.

@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez
Collaborator

ebruchez commented Jul 16, 2014

@ebruchez ebruchez added this to the Consider for 4.8 milestone Jul 16, 2014

@ebruchez ebruchez self-assigned this Jul 16, 2014

@avernet avernet removed this from the Consider for 4.8 milestone Oct 17, 2014

@ebruchez ebruchez removed this from the Consider for 4.8 milestone Oct 17, 2014

@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez
Collaborator

ebruchez commented Sep 22, 2015

@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez Feb 15, 2017

Collaborator

#3065 suggests that relevant="annotate" could be added. You could have:

relevant="blank annotate"

We would need another attribute to specify the name of the annotation unless we want to introduce fancy syntax. See:

relevant="annotate" xxf:relevant-attribute="fr:relevant"

Or:

relevant="annotate(fr:relevant)"

Alternatively, the simple presence of xxf:relevant-attribute="fr:relevant" would suffice.

Collaborator

ebruchez commented Feb 15, 2017

#3065 suggests that relevant="annotate" could be added. You could have:

relevant="blank annotate"

We would need another attribute to specify the name of the annotation unless we want to introduce fancy syntax. See:

relevant="annotate" xxf:relevant-attribute="fr:relevant"

Or:

relevant="annotate(fr:relevant)"

Alternatively, the simple presence of xxf:relevant-attribute="fr:relevant" would suffice.

@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez Feb 15, 2017

Collaborator

blank must not remove elements and attributes, for example if say a section is non-relevant. Proposal:

  • attributes: set empty value
  • elements: clear content iif there is no child element
Collaborator

ebruchez commented Feb 15, 2017

blank must not remove elements and attributes, for example if say a section is non-relevant. Proposal:

  • attributes: set empty value
  • elements: clear content iif there is no child element
@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez Feb 15, 2017

Collaborator
  • Q: Should anything happen with validation after blanking?
  • A: I think not. Blanking is purely a serialization option. Constraints could depend on pruned nodes and cause validation to fail again, and the same goes for blanking.
Collaborator

ebruchez commented Feb 15, 2017

  • Q: Should anything happen with validation after blanking?
  • A: I think not. Blanking is purely a serialization option. Constraints could depend on pruned nodes and cause validation to fail again, and the same goes for blanking.
@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez Feb 15, 2017

Collaborator
  • implement
    • as elements and attributes are leaves, we should be able to do a single pass on the XML
  • enhancement suggestion for XForms 2.0: maybe call this nonrelevant instead (2017-03-24: sent email)
  • update to match XForms 2.0 names
    • nonrelevant attribute name
    • keep/remove/empty
  • tests
  • doc
    • xf:submission
    • Form Runner send action
Collaborator

ebruchez commented Feb 15, 2017

  • implement
    • as elements and attributes are leaves, we should be able to do a single pass on the XML
  • enhancement suggestion for XForms 2.0: maybe call this nonrelevant instead (2017-03-24: sent email)
  • update to match XForms 2.0 names
    • nonrelevant attribute name
    • keep/remove/empty
  • tests
  • doc
    • xf:submission
    • Form Runner send action

@ebruchez ebruchez added this to the 2017.1 milestone Feb 15, 2017

@ebruchez ebruchez changed the title from Clear non-relevant data upon save to Clear non-relevant data when saving Feb 16, 2017

@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez Feb 16, 2017

Collaborator

Right now, in Form Runner, invalid AND non-relevant data:

  • does not cause errors in the error summary
  • does not cause save to fail, because invalid AND non-relevant data is pruned

So could we switch to enabling blanking non-relevant values by default upon save?

I can imagine somebody somewhere relying on this data being not blanked.

Collaborator

ebruchez commented Feb 16, 2017

Right now, in Form Runner, invalid AND non-relevant data:

  • does not cause errors in the error summary
  • does not cause save to fail, because invalid AND non-relevant data is pruned

So could we switch to enabling blanking non-relevant values by default upon save?

I can imagine somebody somewhere relying on this data being not blanked.

@ebruchez ebruchez changed the title from Clear non-relevant data when saving to Submission: option to clear non-relevant data Mar 16, 2017

ebruchez added a commit that referenced this issue Mar 17, 2017

ebruchez added a commit that referenced this issue Mar 17, 2017

Implement #1179 and #3065
- XForms
  - `xxf:annotate="relevant"`
  - `xxf:annotate="token=qname"`
  - `relevant="keep|blank|prune"`
  - update XForms XML Schema
- Form Runner
  - `save` defaults to `annotate="relevant"`
  - remove `fr:relevant` attributes upon reading
  - `send` deprecates `prune` and uses `relevant`
  - persistence proxy
    - support `relevant=prune` on data GET
  - `relevant="false"` → `relevant="keep"`

ebruchez added a commit that referenced this issue Mar 17, 2017

@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez Mar 24, 2017

Collaborator

RESOLUTION: Switch to using nonrelevant as attribute name.

Collaborator

ebruchez commented Mar 24, 2017

RESOLUTION: Switch to using nonrelevant as attribute name.

@ebruchez ebruchez added this to Needs Doc in Orbeon Forms 2017.1 Apr 27, 2017

ebruchez added a commit that referenced this issue Apr 28, 2017

Fix #3172 following #1179 and #3065
- fix use of prune vs. relevant
- also support pruned node in submission without error

@ebruchez ebruchez added the XForms 2.0 label May 9, 2017

ebruchez added a commit that referenced this issue May 10, 2017

For #1179: use new names
- `nonrelevant` on `xf:submission`
- values: `keep|remove|empty`
@ebruchez

This comment has been minimized.

Show comment
Hide comment
@ebruchez

ebruchez May 11, 2017

Collaborator

Documented

Collaborator

ebruchez commented May 11, 2017

Documented

@ebruchez ebruchez closed this May 11, 2017

@ebruchez ebruchez moved this from Missing Doc to Done in Orbeon Forms 2017.1 May 11, 2017

@ebruchez ebruchez removed the Missing Doc label May 25, 2017

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