- Timestamp:
- 2011-04-29T13:19:47+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java
r23791 r23968 277 277 } 278 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 } 279 311 } 280 312
Note:
See TracChangeset
for help on using the changeset viewer.