XSLT调用JS或者JAVA

XSLT调用JS  http://www.ibm.com/developerworks/cn/xml/tips/x-tipxsltjs/index.html
XSLT调用JAVA  http://unmi.cc/xslt-call-java-method

package org.lvsenlin;

import java.text.SimpleDateFormat;
import java.util.Random;
 
public class XsltFunctions {
    public static int re_int(int a){
        return a;
    }
    public static int re_random(int a){
    	int r=new Random().nextInt(10000);
		return r;
    }
    public static String TimeStampDate(String timestampString){    
    	String date = new SimpleDateFormat("yyyy-MM-dd").format(Long.parseLong(timestampString));
    	return date;
	}   
    public static void main(String[] args) {
    	String date = TimeStampDate("1322755200000");
    	System.out.println(date);
	}
}
 


	
		
			
				
			
		
	
 

 

你可能感兴趣的:(XSLT调用JS或者JAVA)