- From: Philip Fennell <Philip.Fennell@marklogic.com>
- Date: Wed, 29 Mar 2017 12:47:57 +0000
- To: Steven Pemberton <steven.pemberton@cwi.nl>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>, Erik Bruchez <erik@bruchez.org>
- Message-ID: <C0094ACF-F04F-4F2C-A665-FFDB4A2C7598@marklogic.com>
Yes, that’s the question. Does it remove node values (text nodes and/or attribute values) of the descendants? From: Steven Pemberton <steven.pemberton@cwi.nl> Organization: CWI, Amsterdam Date: Wednesday, 29 March 2017 at 13:43 To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>, Erik Bruchez <erik@bruchez.org>, Philip Fennell <Philip.Fennell@marklogic.com> Subject: Re: submission/@relevant proposal On Wed, 29 Mar 2017 14:28:17 +0200, Philip Fennell <Philip.Fennell@marklogic.com> 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: <instance> <data xmlns=""> <amount>9.9</amount> <method>cash</method> <cc><number>1234567890</number> <expire>12/17</expire> </cc> </data> </instance> <bind ref="cc" relevant="../method='cc'"/> <submission ... nonrelevant="blank" .../> Should we expect <data xmlns=""> <amount>9.9</amount> <method>cash</method> <cc><number/> <expire/> </cc> </data> or <data xmlns=""> <amount>9.9</amount> <method>cash</method> <cc/> </data> ? Steven Philip From: Steven Pemberton <steven.pemberton@cwi.nl> Organization: CWI, Amsterdam Date: Wednesday, 29 March 2017 at 10:35 To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>, Erik Bruchez <erik@bruchez.org> Subject: Re: xf:submission/@relevant proposal Resent-From: <public-xformsusers@w3.org> 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 nonrelevant="keep|remove|empty" 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") Steven On Fri, 24 Mar 2017 22:38:09 +0100, Erik Bruchez <erik@bruchez.org> wrote: 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 Wednesday, 29 March 2017 12:48:32 UTC