This discussion is archived
3 Replies Latest reply: Jul 25, 2012 3:07 AM by ramp RSS

XSLT - How to pass a Java object to the xslt file ?

951395 Newbie
Currently Being Moderated
Hi ,
I need help in , How to pass a java object to xslt file.

I am using javax.xml.transform.Tranformer class to for the xsl tranformation. I need to pass a java object eg

Class Employee {

private String name;
private int empId;

public String getName() {

public String getEmpId() {
return this.empId;

public String setName(String name) { = name;

public String setEmpId(int empId){
this.empId = empId;

How can i access this complete object in the xsl file ? is there any way i can pass custom objects to xsl using Transformer class ?


  • Correct Answers - 10 points
  • Helpful Answers - 5 points