extracts, and normalizes a url attribute value of a node
function resolveUrlAttribute ($node, attr) {
    var url = $node.attr(attr);
    if (url === undefined) return '';
    if (isAbsoluteUrl(url)) {
      return url;
    } else {
      return urlUtil.resolve(base, url);
    }
  }