n be a list of all children of common ancestor
  // that are contained in the context object, in tree order."
  //
  // "If any member of contained children is a DocumentType, raise a
  // HIERARCHY_REQUEST_ERR exception and abort these steps."
  var containedChildren = [];
  for (var i = 0; i < commonAncestor.childNodes.length; i++) {
    if (isContained(commonAncestor.childNodes[i], range)) {
      if (commonAncestor.childNodes[i].nodeType
      == Node.DOCUMENT_TYPE_NODE) {
        return "HIERARCHY_REQU