Stefan Behnel wrote:
1. In some cases (though not here) I'm replacing one placeholder with multiple nodes.
Another nice feature: support a sequence as replacement. :)
Although that requirement is basically satisfied with slice replacements, so I guess that won't make it in for now.
Could you elaborate an example?
2. This code appears within a loop that's manipulating the tree for each of multiple elements matched with an XPath expression. I thought deleting a node mid-iteration would cause problems.
XPath returns a list of nodes, so you are no longer iterating over the tree structure in this case. Ripping stuff out should be absolutely safe here.
Cool! Less code.
Output:
<p class="discreet">...<esi:include xmlns:esi="http://www.edge-delivery.org/esi/1.0" src="http://..."></esi:include></p> Works for me. Could you send me a complete code snippet where it doesn't work for you? How much work are you willing to put in? :-)
I can give you a Plone buildout that will set up everything and talk you through the steps to reproduce.
LOL! :)
"You know, I have this huge pile of code here, but it's really easy to set up and then all you have to do is a tiny bit of debugging. It's easy! It really is! I can't believe you don't want to feel the fun to try it!"
That's why I asked. :-p
Honestly, could you try to come up with a little example that injects namespaced XML content into a small HTML page, and that shows that the XML serialiser behaves unexpected? Shouldn't be hard to write...
See my other mail. I got a minimal example that's bombing out for me. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book