Re: [j-nsp] How to trim the text node of a specific element node in SLAX node-set?

2018-11-02 Thread Phil Shafer
Martin T writes: >Thanks Phil! I wasn't aware of the mode statement. However, as I don't >see a performance benefit, then solution in my initial e-mail looks >bit simpler. It always depends on the rules and the structure of the contents you are converting, but when someone says "I want to

Re: [j-nsp] How to trim the text node of a specific element node in SLAX node-set?

2018-11-02 Thread Martin T
On Thu, Oct 25, 2018 at 10:08 PM Phil Shafer wrote: > > Martin T writes: > >I need to trim the text node of a specific element node in SLAX. All > >other elements should remain as in the original node-set. At the > >moment, I do it like this: > > Use apply-templates and a distinct mode to

Re: [j-nsp] How to trim the text node of a specific element node in SLAX node-set?

2018-10-25 Thread Phil Shafer
Martin T writes: >I need to trim the text node of a specific element node in SLAX. All >other elements should remain as in the original node-set. At the >moment, I do it like this: Use apply-templates and a distinct mode to traverse the entire hierarchy and apply rules to rebuild content, like:

[j-nsp] How to trim the text node of a specific element node in SLAX node-set?

2018-10-24 Thread Martin T
Hi! I need to trim the text node of a specific element node in SLAX. All other elements should remain as in the original node-set. At the moment, I do it like this: $ cat trim_node-set.slax version 1.2; main { var $alphabet := { { { "bbb "; "ccc "; }