private Element makeTerm(Document doc, TablesRevisionProblem problem, Field field)
      throws RenderException {
    assert field != null;

    Element element = doc.createElement("term");

    if (field.equals(problem.getFraction())) {
      Element child = doc.createElement("numerator");
      child.setTextContent("1");
      element.appendChild(child);

      child = doc.createElement("denominator");
      child.setTextContent(String.valueOf(problem.getValue(field)));
      if (field.equals(problem.getBlank())) {
        setBlank(element);
      }
      element.appendChild(child);

    } else {
      if (field.equals(problem.getBlank())) {
        setBlank(element);
      }

      element.setTextContent(String.valueOf(problem.getValue(field)));
    }

    return element;
  }
  private Element makeRHS(Document doc, TablesRevisionProblem problem) throws RenderException {

    Element element = doc.createElement("answer");
    element.setTextContent(String.valueOf(problem.getAnswer()));

    if (Field.ANSWER.equals(problem.getBlank())) {
      setBlank(element);
    }

    return element;
  }