 |
Schedule
<%@ page language="java" contentType="text/html" %>
<%@ page import="javax.xml.transform.*"%>
<%@ page import="javax.xml.transform.stream.*"%>
<%
/**
* This JSP may use PMA to set param1 in the
* foo.xsl stylesheet before using the
* stylesheet to transform foo.xml
* and outputing the result.
* HTML tags are not in this release, as it is an include and requires none.
* The xincludes folder is at the root of the sports directory.
* To use:
*
* @authors Paul Campbell seapwc@halcyon.com, Khal Shariff khal_shariff@cbc.ca
* @version $Id: transFormer.jsp,v 1.2 2004/06/08 21:10:10 shariffk Exp $
*/
String docPath = application.getRealPath("/");
String furtherPath = "";
docPath = docPath + furtherPath;
String paramValue = request.getParameter("PMA");
String xmlFile = request.getParameter("XML");
String xslFile = request.getParameter("XSL");
xmlFile = docPath + xmlFile;
xslFile = docPath + xslFile;
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer =
tFactory.newTransformer(new StreamSource(xslFile));
transformer.setParameter("param1", paramValue);
transformer.transform(
new StreamSource(xmlFile), new StreamResult(out));
%>
|
 |
 |
<%@ page language="java" contentType="text/html" %>
<%@ page import="javax.xml.transform.*"%>
<%@ page import="javax.xml.transform.stream.*"%>
<%
/**
* This JSP may use PMA to set param1 in the
* foo.xsl stylesheet before using the
* stylesheet to transform foo.xml
* and outputing the result.
* HTML tags are not in this release, as it is an include and requires none.
* The xincludes folder is at the root of the sports directory.
* To use:
*
* @authors Paul Campbell seapwc@halcyon.com, Khal Shariff khal_shariff@cbc.ca
* @version $Id: transFormer.jsp,v 1.2 2004/06/08 21:10:10 shariffk Exp $
*/
String docPath = application.getRealPath("/");
String furtherPath = "";
docPath = docPath + furtherPath;
String paramValue = request.getParameter("PMA");
String xmlFile = request.getParameter("XML");
String xslFile = request.getParameter("XSL");
xmlFile = docPath + xmlFile;
xslFile = docPath + xslFile;
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer =
tFactory.newTransformer(new StreamSource(xslFile));
transformer.setParameter("param1", paramValue);
transformer.transform(
new StreamSource(xmlFile), new StreamResult(out));
%>
<%@ page language="java" contentType="text/html" %>
<%@ page import="javax.xml.transform.*"%>
<%@ page import="javax.xml.transform.stream.*"%>
<%
/**
* This JSP may use PMA to set param1 in the
* foo.xsl stylesheet before using the
* stylesheet to transform foo.xml
* and outputing the result.
* HTML tags are not in this release, as it is an include and requires none.
* The xincludes folder is at the root of the sports directory.
* To use:
*
* @authors Paul Campbell seapwc@halcyon.com, Khal Shariff khal_shariff@cbc.ca
* @version $Id: transFormer.jsp,v 1.2 2004/06/08 21:10:10 shariffk Exp $
*/
String docPath = application.getRealPath("/");
String furtherPath = "";
docPath = docPath + furtherPath;
String paramValue = request.getParameter("PMA");
String xmlFile = request.getParameter("XML");
String xslFile = request.getParameter("XSL");
xmlFile = docPath + xmlFile;
xslFile = docPath + xslFile;
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer =
tFactory.newTransformer(new StreamSource(xslFile));
transformer.setParameter("param1", paramValue);
transformer.transform(
new StreamSource(xmlFile), new StreamResult(out));
%>
<%@ page language="java" contentType="text/html" %>
<%@ page import="javax.xml.transform.*"%>
<%@ page import="javax.xml.transform.stream.*"%>
<%
/**
* This JSP may use PMA to set param1 in the
* foo.xsl stylesheet before using the
* stylesheet to transform foo.xml
* and outputing the result.
* HTML tags are not in this release, as it is an include and requires none.
* The xincludes folder is at the root of the sports directory.
* To use:
*
* @authors Paul Campbell seapwc@halcyon.com, Khal Shariff khal_shariff@cbc.ca
* @version $Id: transFormer.jsp,v 1.2 2004/06/08 21:10:10 shariffk Exp $
*/
String docPath = application.getRealPath("/");
String furtherPath = "";
docPath = docPath + furtherPath;
String paramValue = request.getParameter("PMA");
String xmlFile = request.getParameter("XML");
String xslFile = request.getParameter("XSL");
xmlFile = docPath + xmlFile;
xslFile = docPath + xslFile;
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer =
tFactory.newTransformer(new StreamSource(xslFile));
transformer.setParameter("param1", paramValue);
transformer.transform(
new StreamSource(xmlFile), new StreamResult(out));
%>
<%@ page language="java" contentType="text/html" %>
<%@ page import="javax.xml.transform.*"%>
<%@ page import="javax.xml.transform.stream.*"%>
<%
/**
* This JSP may use PMA to set param1 in the
* foo.xsl stylesheet before using the
* stylesheet to transform foo.xml
* and outputing the result.
* HTML tags are not in this release, as it is an include and requires none.
* The xincludes folder is at the root of the sports directory.
* To use:
*
* @authors Paul Campbell seapwc@halcyon.com, Khal Shariff khal_shariff@cbc.ca
* @version $Id: transFormer.jsp,v 1.2 2004/06/08 21:10:10 shariffk Exp $
*/
String docPath = application.getRealPath("/");
String furtherPath = "";
docPath = docPath + furtherPath;
String paramValue = request.getParameter("PMA");
String xmlFile = request.getParameter("XML");
String xslFile = request.getParameter("XSL");
xmlFile = docPath + xmlFile;
xslFile = docPath + xslFile;
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer =
tFactory.newTransformer(new StreamSource(xslFile));
transformer.setParameter("param1", paramValue);
transformer.transform(
new StreamSource(xmlFile), new StreamResult(out));
%>
|
|