code: private void addRevisionToRevHistory(final Node revHistory, final Node revision) {
          if (revHistory.hasChildNodes()) {
              revHistory.insertBefore(revision, revHistory.getFirstChild());
          } else {
              revHistory.appendChild(revision);
          }
      }
docs: Adds a revision element to the list of revisions in a revhistory element. This method ensures that the new revision is at
  the top of the revhistory list.
  
  @param revHistory The revhistory element to add the revision to.
  @param revision   The revision element to be added into the revisionhistory element.