code: static public List<String> convertLoadpathVariable(Element element) {
  
          // Create the list of strings. Always add the empty string as this will
          // force the lookup routine to always include the "current" directory.
          LinkedList<String> filelist = new LinkedList<String>();
          filelist.add("");
  
          // If the argument is null (the variable doesn't exist), then just
          // return the list with the current directory.
          if (element == null) {
              return filelist;
          }
  
          // Verify that the element is of the correct type (i.e. a list).
          if (!(element instanceof ListResource)) {
              throw new EvaluationException("LOADPATH variable must be a list");
          }
  
          // Loop over the values in the list.
          ListResource loadpath = (ListResource) element;
          for (int i = 0; i < loadpath.size(); i++) {
              try {
                  Element child = loadpath.get(TermFactory.create(i));
                  if (child instanceof StringProperty) {
                      String sfile = ((StringProperty) child).getValue();
                      if (sfile.startsWith("/")) {
                          throw new EvaluationException(
                                  "LOADPATH can only contain relative paths");
                      }
                      filelist.add(sfile);
                  } else {
                      throw new EvaluationException(
                              "LOADPATH contains non-string value");
                  }
              } catch (InvalidTermException ite) {
                  // This exception should never be encountered because the terms
                  // are all indexes and the resource is a list.
                  throw CompilerError.create(MSG_INVALID_KEY_OR_INDEX);
              }
  
          }
  
          return filelist;
      }
docs: Convert the given element (which should be the "LOADPATH" global
  variable) to a list of strings. The list can be used in the template
  loading method.
  
  @param element
  element to convert to list of string (should be "LOADPATH"
  global variable)