xf:submission/@relevant proposal

All,

This attribute takes a boolean value. It is both:

- confusing because it's hard to know which boolean value means to keep
non-relevant nodes or to prune them,
- and limited because there is more you could do with non-relevant nodes,
including blanking them.

So I suggest moving from a boolean to using tokens:

- `keep`: keep all non-relevant nodes
- `blank`: keep non-relevant nodes but blank the value of non-relevant
attributes and non-relevant leaf elements
- `prune`: prune all non-relevant nodes

(A case could be made to allow for the `relevant` MIP to optionally blank
nodes during `recalculate` as well. But that could be considered
separately.)

We could deprecate `false` and `true` on `relevant` and add the 3 tokens
above to that attribute. The issue with this is that:

    relevant="prune"

might give the impression that this will prune relevant nodes (which
doesn't make much sense).

We could also introduce a new attribute, for example `nonrelevant`, which
would take precedence over a deprecated `relevant` attribute:

    nonrelevant="blank"

Thoughts welcome.

-Erik

Received on Friday, 24 March 2017 21:39:03 UTC