Last change
on this file since 3476 was 3362, checked in by kjdon, 22 years ago |
more utils
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
599 bytes
|
Line | |
---|
1 | package org.greenstone.gsdl3.util;
|
---|
2 |
|
---|
3 | /** a class to contain static methods that are used by the xslt
|
---|
4 | * stylesheets
|
---|
5 | */
|
---|
6 | public class XSLTUtil {
|
---|
7 |
|
---|
8 | public static String toLower(String orig) {
|
---|
9 | return orig.toLowerCase();
|
---|
10 | }
|
---|
11 |
|
---|
12 | public static byte[] toUTF8(String orig) {
|
---|
13 |
|
---|
14 | try {
|
---|
15 | byte[] utf8 = orig.getBytes("UTF-8");
|
---|
16 | return utf8;
|
---|
17 | }
|
---|
18 | catch (Exception e){
|
---|
19 | System.out.println("unsupported encoding");
|
---|
20 | return orig.getBytes();
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | public static int getInt(String orig) {
|
---|
25 | return 20;
|
---|
26 | }
|
---|
27 |
|
---|
28 | public static String getString(String orig) {
|
---|
29 | return orig;
|
---|
30 | }
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.