code: public String rootUrlPrefix(PackageDoc doc) {
          if ( doc == null || doc.name().isEmpty() ) {
              return "";
          }
          else {
              StringBuilder buf = new StringBuilder();
              buf.append("../");
              for ( int i = 0; i < doc.name().length(); i++ ) {
                  if ( doc.name().charAt(i) == '.' ) {
                      buf.append("../");
                  }
              }
              return buf.toString();
          }
      }
docs: Returns a prefix for relative URLs from a documentation element relative to the
  given package. This prefix can be used to refer to the root URL of the
  documentation:
  
  ```java
  doc = "<script type=\"text/javascript\" src=\""
  + rootUrlPrefix(classDoc.containingPackage()) + "highlight.js"
  + "\"></script>";
  ```
  
  @param doc    The package containing the element from where to reference the root.
  
  @return A URL prefix for URLs referring to the doc root.