igorh       2003/12/15 13:52:08

  Modified:    java/xdocs/sources/xalan Tag: xslt20-compiled samples.xml
  Added:       java/samples/TransformThread Tag: xslt20-compiled
                        TransformThread.java foo1.xsl foo1.xml foo0.xsl
                        foo0.xml
  Log:
  A sample developed by Richard Cao
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.58.2.1  +23 -15    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.58
  retrieving revision 1.58.2.1
  diff -u -r1.58 -r1.58.2.1
  --- samples.xml       11 Sep 2003 16:01:54 -0000      1.58
  +++ samples.xml       15 Dec 2003 21:52:08 -0000      1.58.2.1
  @@ -74,6 +74,7 @@
   <li><link anchor="trace">Trace</link></li>
   <li><link anchor="validate">Validate</link></li>
   <li><link anchor="trax">trax</link></li>
  +<li><link anchor="transformthread">TransformThread</link></li>
   </ul>
   <p>&xslt4ji; servlet samples:</p>
   <ul>
  @@ -159,7 +160,7 @@
       <p>where <ref>param</ref> is the stylesheet parameter value (a string of 
your choice).</p>  
       </s2><anchor name="sax2sax"/>
     <s2 title="SAX2SAX">
  -  <p>What it does: Explicitly sets the SAX XMLReader and SAX ContentHandler 
for processing the stylesheet (birds.xsl), processing the XML input 
(birds.xml), and producing the output (birds.out).</p>
  +  <p>What it does: Explicitly set the SAX XMLReader and SAX ContentHandler 
for processing the stylesheet (birds.xsl), processing the XML input 
(birds.xml), and producing the output (birds.out).</p>
     <p>Run this sample from the SAX2SAX subdirectory with</p>
      <p><code>java SAX2SAX</code></p>
       </s2><anchor name="dom2dom"/>
  @@ -228,7 +229,7 @@
       <p>For more information, see <link idref="usagepatterns" 
anchor="xpath">Working with XPath expressions</link>.</p>
       </s2><anchor name="appletxmltohtml"/>
       <s2 title="AppletXMLtoHTML">
  -    <p>This applet uses a stylesheet to transform an XML document into HTML. 
It displays the XML document, the
  +    <p>The applet uses a stylesheet to transform an XML document into HTML. 
It displays the XML document, the
        stylesheet, and the HTML output.</p>
       <p>How to run it: Open appletXMLtoHTML.hmtl in the Internet Explorer 5 
browser.</p>
       <note>For information about running &xslt4j; applets in Netscape 
Communicator, see <link idref="usagepatterns" anchor="netscape">Problems
  @@ -242,8 +243,8 @@
       <p>The servlet subdirectory contains four sample servlets and one JSP 
that use &xslt4j; to perform transformations. The sample 
       code is compiled and packed in xalanservlet.war. To run these samples, 
you must place 
       xalanservlet.war on a web server with a servlet engine. For example, 
using <jump href="http://jakarta.apache.org/tomcat/index.html";>jakarta-tomcat 
4.1.18</jump>. 
  -    Copy the xalanservlet.war to %Tomcat_Home%/webapps. For more details 
about deploying
  -    servlets on Tomcat, please refer to <jump 
href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html";>Deployment
 Organization</jump>.</p>
  +    Copy the xalanservlet.war to %Tomcat_Home%/webapps. For more detail 
about deploying
  +    servlet on Tomcat, please refer to <jump 
href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html";>Deployment
 Organization</jump>.</p>
       <note>Dependency on Tomcat version. If encountering 
"java.lang.VerifyError: Cannot inherit from final class" error, 
       replace xercesImpl.jar under %Tomcat_Home%/common/endorsed with the one 
included with &xslt4j; .</note>
       <p><link anchor="simplexsltservlet">servlet.SimpleXSLTServlet</link> 
applies a particular stylesheet to a particular 
  @@ -269,10 +270,10 @@
        <s3 title="servlet.UseStylesheetParamServlet">
        <note>Paul Campbell &lt;[EMAIL PROTECTED]&gt; wrote this servlet and 
the following explanatory text.
        Thank you, Paul!</note>
  -     <p>What it does: The client (perhaps an HTML form) specifies an XML 
document, a stylesheet, and a value to be passed
  +     <p>What it does: The client (perhaps an HTML form ) specifies an XML 
document, a stylesheet, and a value to be passed
         to the stylesheet for a stylesheet parameter named "param1". The 
servlet performs the transformation and returns
         the output to the client. The client must specify which stylesheet 
(containing a "param1" stylesheet parameter") 
  -      and XML file are to be used or use sample files fooparam.xml and 
fooparam.xsl.</p>
  +      and XML file are to be used or use sample files fooparam.xml and 
fooparam.xsl</p>
        <p>How to run it: set up an HTML client to call the servlet with 
arguments along the lines of</p>
       
<gloss><label>http://localhost:port/xalanservlet/UseStylesheetParamServlet?
       XML=fooparam.xml&amp;XSL=fooparam.xsl&amp;PVAL=GoodBye</label></gloss>
  @@ -318,8 +319,8 @@
       <p>To run the servlet:  set system property server.root=server root. Set 
up an HTML page to call
        servlet.ApplyXSLT with arguments as illustrated below.</p>
       <p>The files catalog.xml,  booklist1.xsl and booklist2.xsl are used in 
the following example.
  -    In the deployment descriptor, booklist1.xsl is set as the default xsl 
file. If you create these files yourself, make sure that you set the output 
method
  -    to "xml" in the stylesheet.</p>
  +    In the deploy descriptor, booklist1.xsl is set as the default xsl file. 
If you create these files yourself, be careful that the output method should
  +    be set to "xml" in the stylesheet.</p>
        <p>Examples:</p>
   <gloss>
   
<label>http://localhost:port/xalanservlet/ApplyXSLT?URL=/xalanservlet/catalog.xml&amp;xslURL=
  @@ -489,7 +490,7 @@
       </s3><anchor name="pquery"/>
       <s3 title="Parameterized query">
       <p><em>Contributed by John Gentilin ([EMAIL PROTECTED]).</em></p>
  -    <p>What it does: connects to a datasource, executes a parameterized 
query, and returns the result. The XML source document
  +    <p>What it does: connect to a datasource, execute a parameterized query, 
and return the result. The XML source document
       provides the parameter value as well as the connection information. The 
parameter value is in a node in the XML source.</p>
       <p>The stylesheet gets the required connection and parameter information 
from the XML source, sets up and executes the
       parameterized query, and retuns the query result set.</p>
  @@ -505,7 +506,7 @@
       <p>1. To turn caching on:</p>
       <p><code>java org.apache.xalan.xslt.Process</code>
       <br/><code>-xsl cachedNodes.xsl</code></p>
  -    <p>2. To turn caching off:</p>
  +    <p>1. To turn caching off:</p>
       <p><code>java org.apache.xalan.xslt.Process</code>
       <br/><code>-xsl streamNodes.xsl</code></p>
       <p>3. <ref>To be added</ref></p>
  @@ -529,9 +530,7 @@
         <p>What it does: Trace uses the TraceListener and TraceManager classes 
to log transformation events.</p>
         <p>Run this sample from the Trace subdirectory with</p>
         <p><code>java Trace</code></p>
  -      <p>and examine the result in events.log. Additionally, run this sample 
from the extensions subdirectory with</p>
  -      <p><code>java Trace 3-java-namespace</code></p>
  -      <p>for the trace of a stylesheet with extensions. For more 
information, see <link idref="usagepatterns" anchor="debugging">Debugger
  +      <p>and examine the result in events.log. For more information, see 
<link idref="usagepatterns" anchor="debugging">Debugger
         Interface</link></p>
        </s2><anchor name="validate"/>
        <s2 title="Validate">
  @@ -564,9 +563,18 @@
        </s2>
        <anchor name="trax"/>
        <s2 title="trax">
  -     <p>What it does: runs a number of samples illustrating uses of the 
<link idref="trax">TrAX (Transformation API for XML)</link> interfaces.</p>
  +     <p>What it does: run a number of samples illustrating uses of the <link 
idref="trax">TRaX (Transformation API for XML)</link> interfaces.</p>
        <p>Run this sample from the trax subdirectory with</p>
        <p><code>java Examples</code></p>
        <p>and examine the source in Examples.java and 
ExampleContentHandler.java.</p>
  -     </s2>&xsltcsamples;
  +     </s2>
  +     
  +     <anchor name="transformthread"/>
  +     <s2 title="TransformThread">
  +     <p>What it does: spawns multiple threads, with each thread running two 
transformations on two different XML files.</p>
  +     <p>Run this sample from the TransformThread subdirectory with</p>
  +     <p><code>java TransformThread</code></p>
  +     <p>and examine the source in TransformThread.java. A more detailed 
description along with configuration options are listed in the header.</p>
  +     </s2>
  +     &xsltcsamples;
   </s1>
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +0 -0      
xml-xalan/java/samples/TransformThread/TransformThread.java
  
  Index: TransformThread.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/samples/TransformThread/TransformThread.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.1.2.1   +0 -0      xml-xalan/java/samples/TransformThread/foo1.xsl
  
  Index: foo1.xsl
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/samples/TransformThread/foo1.xsl,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.1.2.1   +0 -0      xml-xalan/java/samples/TransformThread/foo1.xml
  
  Index: foo1.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/samples/TransformThread/foo1.xml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.1.2.1   +0 -0      xml-xalan/java/samples/TransformThread/foo0.xsl
  
  Index: foo0.xsl
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/samples/TransformThread/foo0.xsl,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.1.2.1   +0 -0      xml-xalan/java/samples/TransformThread/foo0.xml
  
  Index: foo0.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/samples/TransformThread/foo0.xml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to