Changeset 32111


Ignore:
Timestamp:
2018-02-01T13:28:54+13:00 (6 years ago)
Author:
kjdon
Message:

pass in base interfaces array to the call to find archive2document.xsl. If you have a custom interface it will probably live in hte default one. Then check to make sure the file was there before trying to use it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r32075 r32111  
    966966    protected Element transformArchiveToDocument(Element section) {
    967967   
    968     String stylesheet_file = GSFile.stylesheetFile(GlobalProperties.getGSDL3Home(), (String) this.config_params.get(GSConstants.SITE_NAME), "", (String) this.config_params.get(GSConstants.INTERFACE_NAME), null, "archive2document.xsl");
    969     Document stylesheet_doc = XMLConverter.getDOM(new File(stylesheet_file));
     968      String stylesheet_filename = GSFile.stylesheetFile(GlobalProperties.getGSDL3Home(), (String) this.config_params.get(GSConstants.SITE_NAME), "", (String) this.config_params.get(GSConstants.INTERFACE_NAME), (ArrayList<String>) this.config_params.get(GSConstants.BASE_INTERFACES), "archive2document.xsl");
     969      if (stylesheet_filename == null) {
     970    logger.error("Couldn't find stylesheet archive2document.xsl");
     971    return section;
     972      }
     973         
     974    Document stylesheet_doc = XMLConverter.getDOM(new File(stylesheet_filename));
    970975    if (stylesheet_doc == null) {
    971       logger.error("Couldn't load in stylesheet "+stylesheet_file);
     976      logger.error("Couldn't load in stylesheet "+stylesheet_filename);
    972977      return section;
    973978    }
Note: See TracChangeset for help on using the changeset viewer.