Move the position of the entities.sed transformation -- the entities were being removed from the .xhtml file as originally planned, and then promptly put back in by the identity transformation. The entities.sed fix is now in the .xhtml -> .html step.