Re: submission/@relevant proposal

Yes, that’s the question. Does it remove node values (text nodes and/or attribute values) of the descendants?

From: Steven Pemberton <>
Organization: CWI, Amsterdam
Date: Wednesday, 29 March 2017 at 13:43
To: "" <>, Erik Bruchez <>, Philip Fennell <>
Subject: Re: submission/@relevant proposal

On Wed, 29 Mar 2017 14:28:17 +0200, Philip Fennell <> wrote:
With regard to nonrelevant="empty", what happens to the children of a branch node that is, itself, not relevant? Does the submission descend that branch of the tree removing text nodes and attribute values of its descendants?

You mean in a case like this:

    <data xmlns="">
  <bind ref="cc" relevant="../method='cc'"/>
  <submission ... nonrelevant="blank" .../>

Should we expect
    <data xmlns="">


    <data xmlns="">




From: Steven Pemberton <>
Organization: CWI, Amsterdam
Date: Wednesday, 29 March 2017 at 10:35
To: "" <>, Erik Bruchez <>
Subject: Re: xf:submission/@relevant proposal
Resent-From: <>
Resent-Date: Wednesday, 29 March 2017 at 10:36

I think it's a good idea to improve this.

I agree that "relevant='true'" is not descriptive, and confusing.

I think that we should keep "relevant='true|false'" to mean what it does now, and deprecate it.

I'm not sure about the word "prune", since it is not a widely-used word (and has an amusing second meaning).

I presume by 'blank' you mean 'make empty'.

So on reflection I like the idea of deprecating @relevant, and introducing @nonrelevant.

How about


with a default of
    'keep' if @serialization="none"
    'remove' otherwise.

(Although I would prefer a wording that says that this attribute only applies if @serialization is not "none", and the default value is "remove")


On Fri, 24 Mar 2017 22:38:09 +0100, Erik Bruchez <> wrote:


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:


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:


Thoughts welcome.


Received on Wednesday, 29 March 2017 12:48:32 UTC