Publication publication = getPublication();
DocumentBuilder builder = publication.getDocumentBuilder();
// replace all internal links
String oldURL =
getContextPrefix() + builder.buildCanonicalUrl(publication, area, oldDcoumentId);
String newURL =
getContextPrefix() + builder.buildCanonicalUrl(publication, area, newDocumentId);
log("Replace '" + oldURL + "' by '" + newURL + "'");
transformer.setParameter("idbefore", oldURL);