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...@locus.apache.org on 2000/11/02 14:26:40 UTC
cvs commit: xml-xalan/xdocs/sources/xalan usagepatterns.xml
dleslie 00/11/02 05:26:38
Modified: xdocs/sources/xalan usagepatterns.xml
Log:
Addressed SPR on documentation detail: DMAN4QHQB6
Revision Changes Path
1.10 +14 -2 xml-xalan/xdocs/sources/xalan/usagepatterns.xml
Index: usagepatterns.xml
===================================================================
RCS file: /home/cvs/xml-xalan/xdocs/sources/xalan/usagepatterns.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- usagepatterns.xml 2000/05/31 15:57:51 1.9
+++ usagepatterns.xml 2000/11/02 13:26:33 1.10
@@ -292,8 +292,20 @@
<li>Include <resource-ref idref="XSLTProcessorAppletDoc"/> in an HTML client.<br/><br/></li>
<li>Specify the XML source document and XSL stylesheet.<br/><br/>
You can use the DocumentURL and StyleURL PARAM tags or the <resource-ref idref="XSLTProcessorAppletsetDocumentURLDoc"/> and <resource-ref idref="XSLTProcessorAppletsetStyleURLDoc"/>. If the XML document contains a stylesheet Processing Instruction (PI), you do not need to specify an XSL stylesheet.<br/><br/></li>
-<li>Call the <resource-ref idref="XSLTProcessorApplettransformtoHTMLstringstringDoc"/> which performs the transformation and returns the new document as a String.</li></ol>
-<p>For an example, see the <jump href="../samples/appletXMLtoHTML/readme.html">sample applet readme</jump>.</p>
+<li>Call the <resource-ref idref="XSLTProcessorApplettransformtoHTMLstringstringDoc"/> or <resource-ref idref="XSLTProcessorAppletgetHtmlTextDoc"/>which performs the transformation and returns the new document as a String.</li></ol>
+<note>The transformToHTML() method takes arguments for the XML source document and XSL stylesheet. The getHtmlText() method takes no arguments: it uses property or parameter settings, as in the example below.</note>
+<p>For an example, see the <link idref="samples" anchor="appletxmltohtml">AppletXMLtoHTML</link> sample applet. The <applet> tag is in samples/AppletXMLtoHTML/client.html:</p>
+<source><applet
+ name="xslControl"
+ code="org.apache.xalan.xslt.client.XSLTProcessorApplet.class"
+ archive="../../xalan.jar,../../xerces.jar"
+ height="0"
+ width"0">
+ <param name="documentURL" value="xalanApplets.xml"/>
+ <param name="styleURL" value="s1ToHTML.xsl"/>
+</applet>></source>
+<p>When the user clicks the Transform button, the HTML client calls the getHtmlText() method, and puts the returned HTML text in a frame for the user to view.</p>
+
</s2><anchor name="servlet"/>
<s2 title="Using &xslt4j; in a servlet">
<p>You can set up a servlet to use &xslt4j; to respond to requests for XML documents by transforming those documents into HTML and serving them to clients. For a sample of how this might be done, see <link idref="samples" anchor="servlet">sample servlet</link>.</p>