Ignore:
Timestamp:
2012-09-25T15:20:04+12:00 (12 years ago)
Author:
kjdon
Message:

trying to implement getCollectionText with no arguments for the dictionary string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java

    r26243 r26248  
    283283    }
    284284
     285  public static String getCollectionText(String collection, String site_name, String lang, String key) {
     286    return getCollectionTextWithDOMMulti(collection, site_name, lang, key);
     287  }
    285288  // xslt didn't like calling the function with Node varargs, so have this hack for now
    286289  public static String getCollectionTextWithDOM(String collection, String site_name, String lang, String key, Node n1) {
     
    299302
    300303    int num_nodes = nodes.length;
    301     String[] args = new String[num_nodes];
    302 
    303     for (int i=0; i<num_nodes; i++) {
     304    String [] args = null;
     305    if (num_nodes != 0) {
     306      args = new String[num_nodes];
     307
     308      for (int i=0; i<num_nodes; i++) {
    304309     
    305       String node_str = XMLConverter.getString(nodes[i]);
    306       args[i] = node_str;
     310    String node_str = XMLConverter.getString(nodes[i]);
     311    args[i] = node_str;
     312      }
    307313    }
    308314    CollectionClassLoader class_loader = new CollectionClassLoader(XSLTUtil.class.getClassLoader(), GSFile.siteHome(GlobalProperties.getGSDL3Home(), site_name), collection);
Note: See TracChangeset for help on using the changeset viewer.