The fieldValue element is expecting an attribute called identifier, but this is not required in the specification; the variable is identified in the child element:
<setTemplateValue identifier="pAns">
<fieldValue fieldIdentifier="PMathML">
<variable identifier="mAns"/>
</fieldValue>
</setTemplateValue>