Forums Register Login

XSLTProcessor

+Pie Number of slices to send: Send
I need to make use of XSLTProcessor (org.apache.xalan.xslt package) in my jsp page. The problem is even after I have already included the jar files (from xalan-j_2_4_D1-bin.zip that i downloaded in xml.apache.org) in the jre/lib/ext dir of the jdk i'm using, when I run the jsp page, the ff errors occur:
*****************************************
Type XSLTProcessor was not found.
C:\\Program Files\\Allaire\\JRun\\servers\\default\\default-app\\AdminTool\\transformXML2.jsp:44: Error: "XSLTProcessorFactory" is either a misplaced package name or a non-existent entity.
C:\\Program Files\\Allaire\\JRun\\servers\\default\\default-app\\AdminTool\\transformXML2.jsp:53: Error: Type XSLTInputSource was not found.
C:\\Program Files\\Allaire\\JRun\\servers\\default\\default-app\\AdminTool\\transformXML2.jsp:57: Error: Type XSLTResultTarget was not found.
*****************************************
//my code
<%@ page import="org.w3c.dom.*" %>
<%@ page import="org.xml.sax.*" %>
<%@ page import="javax.xml.parsers.*" %>
<%@ page import="javax.xml.transform.*" %>
<%@ page import="javax.xml.transform.stream.*" %>
<%@ page import="javax.xml.transform.dom.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.net.*" %>
<%@ page import="java.text.*" %>
<%@ page import="org.apache.xalan.xslt.*" %>
<%
try {
XSLTProcessor p = XSLTProcessorFactory.getProcessor();

StringBuffer requestURL = HttpUtils.getRequestURL(request);
URL jspURL = new URL(requestURL.toString());
URL in1URL = new URL(jspURL,"master.xml");
URL in2URL = new URL(jspURL,"images.xml");
URL in3URL = new URL(jspURL,"labels.xml");
URL xslURL = new URL(jspURL,"page1.xsl");
p.process(new XSLTInputSource(in1URL.openStream{}),
new XSLTInputSource(in2URL.openStream{}),
new XSLTInputSource(in3URL.openStream{}),
new XSLTInputSource(xslURL.openStream{}),
new XSLTResultTarget(out)
);
out.flush();
}
catch (Exception ex) {
ex.printStackTrace();
}
%>
+Pie Number of slices to send: Send
I can't see the XSLTProcessorFactory under this new JavaDoc

http://xml.apache.org/xalan-j/apidocs/index.html
+Pie Number of slices to send: Send
Hi erin! You mean you can't see the XSLTProcessorFactory class in org.apache.xalan.xslt package? But whenever i search for XSLTProcessorFactory class in google.com, it brings me to the documentation of
org.apache.xalan.xslt package where XSLTProcessorFactory is included as its class. I double-checked the org.apache.xalan.xslt package I downloaded at xml.apache.org and found out that there was no XSLTProcessorFactory class found in the zip file. What do you suggest I should do?
Wanna see my flashlight? How about this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1260 times.
Similar Threads
xalan
JSP and XSL
JSP with XSL
Jsp Error
XSLProcessorException : usage of XSLTInputSource
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 02:35:10.