Changeset 24007 for main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java
- Timestamp:
- 2011-05-09T14:37:04+12:00 (13 years ago)
- Location:
- main/branches/64_bit_Greenstone/greenstone3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/branches/64_bit_Greenstone/greenstone3
- Property svn:mergeinfo changed
-
main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java
r18308 r24007 28 28 import org.w3c.dom.Node; 29 29 30 import org.apache.commons.lang3.StringUtils; 31 30 32 /** a class to contain various static methods that are used by the xslt 31 33 * stylesheets … … 88 90 89 91 public static String getNumberedItem(String list, int number) { 90 String [] items = list.split(",", -1);92 String [] items = StringUtils.split(list, ",", -1); 91 93 if (items.length > number) { 92 94 return items[number]; … … 112 114 String [] args = null; 113 115 if (args_str!=null && !args_str.equals("")) { 114 args = args_str.split(";");116 args = StringUtils.split(args_str, ";"); 115 117 } 116 118 Dictionary dict = new Dictionary("interface_"+interface_name, lang); … … 275 277 } 276 278 279 public static String hashToSectionId(String hashString) 280 { 281 if(hashString == null || hashString.length() == 0 || !hashString.startsWith("HASH")) {return "";} 282 283 int firstDotIndex = hashString.indexOf("."); 284 if(firstDotIndex == -1) 285 { 286 return ""; 287 } 288 289 String sectionString = hashString.substring(firstDotIndex + 1); 290 291 return sectionString; 292 } 293 294 public static String hashToDepthClass(String hashString) 295 { 296 if(hashString == null || hashString.length() == 0 || !hashString.startsWith("HASH")) {return "";} 297 298 String sectionString = hashToSectionId(hashString); 299 300 int count = sectionString.split("\\.").length; 301 302 if (sectionString.equals("")) 303 { 304 return "sectionHeaderDepthTitle"; 305 } 306 else 307 { 308 return "sectionHeaderDepth" + count; 309 } 310 } 277 311 } 278 312
Note:
See TracChangeset
for help on using the changeset viewer.