You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dl...@apache.org on 2001/04/27 22:03:31 UTC
cvs commit: xml-xalan/java/xdocs/sources/xalan extensions.xml samples.xml usagepatterns.xml
dleslie 01/04/27 13:03:31
Modified: java/xdocs/sources/xalan extensions.xml samples.xml
usagepatterns.xml
Log:
1. Added jspSample.jsp to samples.
2. Fixed a class path in usagepatterns.
Revision Changes Path
1.16 +1 -1 xml-xalan/java/xdocs/sources/xalan/extensions.xml
Index: extensions.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/extensions.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- extensions.xml 2001/03/07 18:27:15 1.15
+++ extensions.xml 2001/04/27 20:03:27 1.16
@@ -273,7 +273,7 @@
<p>If the extension element is implemented in a loosely typed scripting language, such as JavaScript, the arguments and return value are untyped.</p>
<p><em>Caution:</em> The value returned by an extension element is placed in the transformation result. If you are not interested in a return value, use a public void Java method or return null from a scripting language function.</p>
<p>Java example: <code>public void myElement</code><br/>
-<code> (org.apache.xalan.xslt.XSLProcessorContext, </code><br/>
+<code> (org.apache.xalan.extensions.XSLProcessorContext, </code><br/>
<code> org.apache.xalan.templates.ElemExtensionCall extensionElement)</code></p>
<p>JavaScript example: <code>function myElement(xslProcContext, element)</code></p>
<p>The <link idref="extensionslib" anchor="redirect">Redirect extension</link> in the extensions library contains three extension elements.</p>
1.28 +9 -0 xml-xalan/java/xdocs/sources/xalan/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/samples.xml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- samples.xml 2001/03/20 16:59:45 1.27
+++ samples.xml 2001/04/27 20:03:27 1.28
@@ -192,6 +192,8 @@
<p><link anchor="usestylesheetparamservlet">servlet.UseStylesheetParamServlet</link> sets a stylesheet parameter
(the parameter name is hardwired into the servlet), and requires the user to supply parameters for the
XML document and XSL stylesheet.</p>
+ <p><link anchor="jspsample">jspSample.jsp</link> is a Java ServerPage that sets a stylesheet parameter and applies the
+ stylesheet to the XML document.</p>
<p><link anchor="xsltservletwithparams">servlet.XSLTServletWithParams</link> accepts parameters for the XML document,
the XSL stylesheet, and any number of stylesheet parameters.</p>
<p><link anchor="applyxslt">servlet.ApplyXSLT</link> (and associated classes) is closer to a production level servlet. It accepts parameters, provides a
@@ -227,6 +229,13 @@
<code>transformer.setParameter("param1", paramValue);</code></p>
<p>The result is returned to the client:</p>
<p><code><html><body><p>GoodBye</p></body></html></code></p>
+ </s3><anchor name="jspsample"/>
+ <s3 title="jspSample.jsp">
+ <note>Paul Campbell <seapwc@halcyon.com> wrote this Java Server Page.</note>
+ <p>This Java Server Page performs essentially the same operation as
+ <link anchor="usestylesheetparamservlet">servlet.UseStylesheetParamServlet</link>. It applies a stylesheet parameter
+ to a stylesheet (fooparam.xsl), applies the stylesheet to an XML source document (fooparam.xml), and returns the
+ result.</p>
</s3><anchor name="xsltservletwithparams"/>
<s3 title="servlet.XSLTServletWithParams">
<p>What it does: servlet.XSLTServletWithParams takes parameters in the request -- a URL parameter for
1.32 +3 -4 xml-xalan/java/xdocs/sources/xalan/usagepatterns.xml
Index: usagepatterns.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/usagepatterns.xml,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- usagepatterns.xml 2001/03/20 16:59:46 1.31
+++ usagepatterns.xml 2001/04/27 20:03:28 1.32
@@ -371,11 +371,10 @@
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException, java.io.IOException
{
- // Output goes in the response stream.
- java.io.PrintWriter out =
- new java.io.PrintWriter(response.getOutputStream());
// Set content type for HTML.
- response.setContentType("text/html");
+ response.setContentType("text/html; charset=UTF-8");
+ // Output goes to the response PrintWriter.
+ java.io.PrintWriter out = response.getWriter());
try
{
javax.xml.transform.TransformerFactory tFactory =
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org