Hi,
I'll leave discussion about code simplification aside, because I know the evil hides in the details, and I have a far too vague idea of the internal code to make up my mind (and I doubt arguing about virtual code complexity at this level will lead to any decisive point).
My opinion is the following: the main point with the thing->path paradigm is that you cannot edit the style of the output. This is by desing, and I'm happy this choice was made, and I think it was a smart choice: we now have our good working and simple to implement lpes! On the other hand, we will sooner or later want to have LOEs (live-"object"-effects) to allow more sophisticated effect (like interpolate shape+style between two objects).
I think we should keep lpes as they are and implement the more sophisticated LOEs. Once they work correctly, we'll can move the lpes to be special cases of LOEs.
Doing the move Kzysztof suggests seem to be more or less equivalent to implementing LOE (am I wrong there?)... The main point is to allow other things than paths (virtually any independent well formed svg object) as output which is the main benefit I see in this representation. Moreover it looks deep and difficult, so there is no hurry anyway. So what about starting to work on LOE's instead of changing LPE's?
Btw, I think the good output for the example of bulia would be:
svg:switch inkscape:envelope-deformation <svg:g inkscape:param-name="object"> svg:switch inkscape:pattern-along-path <svg:path inkscape:param-name="path" id="pathA" ... /> <svg:use inkscape:param-name="pattern" href="url(pathD)" ... /> </inkscape:pattern-along-path> <svg:path ...(result of pattern along path)... /> </svg:switch> svg:switch inkscape:bend <svg:path inkscape:param-name="path" id="pathB" ... /> <svg:use inkscape:param-name="bend-path" href="url(#pathC)" ... /> </inkscape:bend> <svg:path ...(result of bend)... /> </svg:switch> </svg:g> <svg:use inkscape:param-name="envelope-bottom" href="url(#pathC)" ... /> </inkscape:envelope-deformation> * svg:g < ...(result of envelope for A)... /> < ...(result of envelope for B)... /> </svg:g> * </svg:switch>
Of course, the API to produce such output is much more complex!! The lpe itself should be aware it is working on a group and put the relevant outputs in a group... (of course the default behaviour would be coded once for all...)
cheers, jfb.