It works in cases where you're only generating nodes in one transformer, but not more than one, and it only works if the transformer generating those nodes is the last selector/transformer pair in the fragment. We can fix this with a mildly more complex reduce function.
We have a bit of a problem to think about though. If you have transformer x and transformer y that both match node a and selector for x matches first and returns a seq, what does selector for y try to match on? The original node is either gone or mixed in with a bunch of other nodes at this point.
It works in cases where you're only generating nodes in one transformer, but not more than one, and it only works if the transformer generating those nodes is the last selector/transformer pair in the fragment. We can fix this with a mildly more complex reduce function.
We have a bit of a problem to think about though. If you have transformer x and transformer y that both match node a and selector for x matches first and returns a seq, what does selector for y try to match on? The original node is either gone or mixed in with a bunch of other nodes at this point.