So, I've got a few different things we can do, but my preferred solution is to ignore the wrapped text (i.e., don't traverse the children, don't output anything under foo) for the *ajax* case only, and leave it alone for the full response case, since I don't want to break any existing odd-looking code.
I think that if a value is provided, then the children should not be rendered. In effect, the value attribute is the content override. So the correct output should be:
<span id="foo">value</span>
I don't think Ajax should be a special case, this is a general problem with how the template is interpreted.
I also feel that we should spec this because it is senseless to have both a value attribute and nested text. Am I missing a case when both would be needed for some other standard output tag?
-Dan