generalise how to process a set of occurences within a text node
prevent breakage from assumed chainability
update error messages