Changeset 26315 for main

Show
Ignore:
Timestamp:
16.10.2012 14:54:58 (7 years ago)
Author:
kjdon
Message:

I wanted to get collection text with a string arg

Files:
1 modified

Legend:

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

    r26279 r26315  
    294294    public static String getCollectionText(String collection, String site_name, String lang, String key) 
    295295    { 
    296         return getCollectionTextWithDOMMulti(collection, site_name, lang, key); 
    297     } 
     296      return getCollectionTextWithArgs(collection, site_name, lang, key, null); 
     297    } 
     298 
     299  public static String getCollectionText(String collection, String site_name, String lang, String key, String args_str) 
     300  { 
     301 
     302    String[] args = null; 
     303    if (args_str != null && !args_str.equals("")) 
     304      { 
     305    args = StringUtils.split(args_str, ";"); 
     306      } 
     307 
     308    return getCollectionTextWithArgs(collection, site_name, lang, key, args); 
     309  } 
    298310 
    299311    // xslt didn't like calling the function with Node varargs, so have this hack for now 
     
    333345            } 
    334346        } 
     347        return getCollectionTextWithArgs(collection, site_name, lang, key, args); 
     348    } 
     349 
     350  public static String getCollectionTextWithArgs(String collection, String site_name, String lang, String key, String [] args) { 
    335351 
    336352        CollectionClassLoader class_loader = new CollectionClassLoader(XSLTUtil.class.getClassLoader(), GSFile.siteHome(GlobalProperties.getGSDL3Home(), site_name), collection);