dleslie     01/05/10 11:10:02

  Modified:    java/xdocs/sources/xalan getstarted.xml index.xml readme.xml
                        resources.xml usagepatterns.xml whatsnew.xml
  Added:       java/xdocs/sources/xalan xsltc_constraints.xml
                        xsltc_usage.xml
  Log:
  New material for XSLTC
  
  Revision  Changes    Path
  1.12      +1 -1      xml-xalan/java/xdocs/sources/xalan/getstarted.xml
  
  Index: getstarted.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/getstarted.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- getstarted.xml    2001/01/24 15:36:39     1.11
  +++ getstarted.xml    2001/05/10 18:09:44     1.12
  @@ -24,7 +24,7 @@
   </s2><anchor name="classpath"/>
   <s2 title="Setting up the system classpath">
   <p>At the very minimum, you must include xalan.jar and xerces.jar (or 
another conformant XML parser -- see <link idref="usagepatterns" 
anchor="plug">Plugging in a Transformer and XML parser</link>) on the system 
classpath. To run the sample applications, include xalansamples.jar (all 
samples other than the servlet) and xalanservlet.jar. To run extensions, 
include bsf.jar. All these JAR files are distributed with &xslt4j;. For 
extensions implemented in JavaScript or another scripting language, see <link 
idref="extensions" anchor="supported-lang">extensions language 
requirements</link> to identify any additional JAR files you must place on the 
classpath and where you can get them.</p>
  -<p>If you are using JDK or JRE 1.1.8, also include classes.zip on the 
classpath.</p>
  +<p>If you are using JDK or JRE 1.1.8, also include classes.zip on the 
classpath. If you are using JDK or JRE 1.2, include tools.jar on the 
classpath.</p>
   <note>If you are using xerces.jar from a Xerces release that is more recent 
than &xml4j-used;, you may need to put xerces.jar before xalan.jar on the 
classpath. Both JAR files include the org.w3c.dom packages. The Xerces team is 
tracking updates to DOM level 2, and the Xerces parser may require access to 
updates in these packages.</note>
   </s2><anchor name="samples"/>
   <s2 title="Trying out the samples">
  
  
  
  1.20      +3 -2      xml-xalan/java/xdocs/sources/xalan/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/index.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- index.xml 2001/03/13 21:01:08     1.19
  +++ index.xml 2001/05/10 18:09:46     1.20
  @@ -70,8 +70,9 @@
        <p>For more information, see <link idref="whatsnew">What's new in 
&xslt4j2;</link>.</p>
     </s2>
     <s2 title="How about this release?">
  -  <p>&xslt4j-current; is a production release It incorporates a number of 
enhancements and bug fixes. For the details, see 
  -  <link idref="readme">Release Notes</link>. Please send your feedback to 
the <human-resource-ref idref="xalandev"/>.</p>
  +  <p>&xslt4j-current; is a production release. This is the first &xslt4j; 
release to include the 
  +  <link idref="xsltcusage">XSLTC</link> translet compiler and runtime,. This 
release also incorporates a number of bug fixes.
  +   For the details, see <link idref="readme">Release Notes</link>. Please 
send your feedback to the <human-resource-ref idref="xalandev"/>.</p>
     </s2> 
     <s2 title="How do I get it?">
       <p>Download and unzip either of the following:</p>
  
  
  
  1.32      +4 -2      xml-xalan/java/xdocs/sources/xalan/readme.xml
  
  Index: readme.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/readme.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- readme.xml        2001/03/21 13:26:37     1.31
  +++ readme.xml        2001/05/10 18:09:47     1.32
  @@ -77,8 +77,10 @@
       <li><link anchor="to-do">To-do tasks for future &xslt4j; 
releases</link></li>
      </ul>
        <anchor name="done"/>
  -     <s3 title="Changes since &xslt4j; 2.0.1">
  -     <p>This release includes a number of bug fixes to the &xslt4j; and TrAX 
core and Xalan-Java 1 compability API. We have also</p>
  +     <s3 title="Changes since &xslt4j; 2.0.1">&xsltcreadme;
  +     <p>This release also includes a number of bug fixes to the &xslt4j; and 
TrAX core and Xalan-Java 1 compability API. 
  +     We have also enhanced the ApplyXSLT servlet. It can now be set up to 
use a compiled Templates object to respond to multiple
  +     client transformation requests involving the same stylesheet.</p>
        <ul>
        <li></li>
        <li><br/><br/></li> 
  
  
  
  1.15      +1 -1      xml-xalan/java/xdocs/sources/xalan/resources.xml
  
  Index: resources.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/resources.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- resources.xml     2001/03/07 13:05:29     1.14
  +++ resources.xml     2001/05/10 18:09:49     1.15
  @@ -88,7 +88,7 @@
               
location="http://java.sun.com/aboutJava/communityprocess/review/jsr063"/>
     <resource id="trax" 
               title="TRaX (Transformation API for XML)" 
  -            location="apidocs/javax/xml/transform/trax.html"/>
  +            location="trax.html"/>
               
     <resource id="compatapi"
               title="Xalan-Java 1 compatibility Javadoc"
  
  
  
  1.33      +11 -1     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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- usagepatterns.xml 2001/04/27 20:03:28     1.32
  +++ usagepatterns.xml 2001/05/10 18:09:50     1.33
  @@ -141,9 +141,19 @@
   <p>You can change these settings as follows:</p>
   <ol>
     <li>Declare the xalan namespace in your stylesheet element 
(xmlns:xalan="http://xml.apache.org/xslt";).<br/><br/></li>
  -  <li>Use the namespace prefix you assign (we use "xalan" here in the text) 
to redefine properties of interest in the stylesheet xsl:output
  +  <li>Use the namespace prefix you assign (for example, "xalan") to redefine 
properties of interest in the stylesheet xsl:output
         element (for example, xalan:indent-amount="5").</li>
   </ol>
  +<p>The following stylesheet fragment declares the xalan namespace and sets 
indent-amount to 2:</p>
  +<source>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  +&lt;xsl:stylesheet version="1.0" 
  +                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  +                xmlns:xalan="http://xml.apache.org/xslt"&gt;
  +                
  +  &lt;xsl:output method="xml" 
  +              encoding="UTF-8"
  +              indent="yes" 
  +              xalan:indent-amount="2"/&gt;</source>
     <p>If you want to change the property settings globally, edit the values 
in the property files in src/org/apache/xalan/templates, 
     and use Ant to <link idref="readme" anchor="jar">rebuild 
xalan.jar</link>.</p>
   <p>The properties files define the following properties:</p>
  
  
  
  1.19      +2 -2      xml-xalan/java/xdocs/sources/xalan/whatsnew.xml
  
  Index: whatsnew.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/whatsnew.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- whatsnew.xml      2001/01/11 18:31:32     1.18
  +++ whatsnew.xml      2001/05/10 18:09:52     1.19
  @@ -57,7 +57,7 @@
    * <http://www.apache.org/>.
    -->
   <s1 title="What's new in &xslt4j2;">
  -
  +  &xsltcwhatsnewhead;
     <s2 title="New Design">
     <p>&xslt4j2; represents a fundamental redesign of Xalan. The primary 
objective of this redesign is an easier-to-use, more understandable, and more 
modular API that encourages wider participation in its ongoing development by 
the open-source XML developer community, and that lends itself to "streaming," 
the production of transformation output while the input is still being 
parsed.</p>
   <p>&xslt4j2; builds on <resource-ref idref="sax2"/>, <resource-ref 
idref="dom2"/>, and the <resource-ref idref="jaxp"/>. For example, &xslt4j2; 
incorporates the SAX parsing event model in its support for the incremental 
production of transformation output. &xslt4j2; also implements the  standard 
TrAX API (see below) that enables you to code your XML applications without 
reference to the internal details of a particular Transformer or XML parser.</p>
  @@ -65,5 +65,5 @@
   <p>&xslt4j2; implements the <resource-ref idref="trax"/> interfaces. The 
product of extensive open-source collaboration by members of the XML developer 
community, TrAX provides a conceptual framework and a standard API for 
performing XML transformations. During its evolution, the TrAX API has 
undergone several revisions. We believe this API has now reached or is very 
close to final form. In November 2000, TrAX was incorporated into <resource-ref 
idref="jsr063"/>, the Java API for XML Processing 1.1 , which has been 
published for public review (see <resource-ref idref="jaxp11"/>). We strongly 
encourage you to utilize the TrAX framework when you use &xslt4j2; to perform 
XML transformations.</p>
   <p>The basic organization of TrAX is quite simple: use a TransformerFactory 
to process transformation instructions and generate a Transformer, with which 
you can apply the processed transformation instructions to your XML Source, 
producing a transformation Result. For more detail, see <link 
idref="usagepatterns" anchor="basic">Basic steps</link>.</p>
   <p>As part of the Java API for XML Processing, TraX provides a stable 
framework for plugging Transformers (like &xslt4j;) and XML parsers (like 
&xml4j;) into your applications without tying yourself to the internal details 
of those implementations. See <link idref="usagepatterns" 
anchor="plug">Plugging in a Transformer and XML parser</link>.</p>
  -</s2>
  +</s2>&xsltcwhatsnew;
   </s1>
  
  
  
  1.1                  xml-xalan/java/xdocs/sources/xalan/xsltc_constraints.xml
  
  Index: xsltc_constraints.xml
  ===================================================================
  <s2 title="XSLTC Usage Constraints">
  <p>XSLTC does not yet support the following features of the <resource-ref 
idref="xsl"/>:</p>
  <ul>
    <li>The namespace axis.<br/><br/></li>
    <li>Complete support for extension elements and functions. Currently you 
can set up an extension function
    to call a static Java function. For the extension namespace, use<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;http://www.sun.com/xsltc/java/&lt;class&gt;<br/>
    [can we change this to xml.apache.org/xalan/xsltc/java/&lt;class&gt;]<br/>
    where &lt;class&gt; identifies the class with the static 
method.<br/><br/></li>
    <li><br/><br/></li>
    <li><br/><br/></li>  
  </ul>
  </s2>
  
  
  1.1                  xml-xalan/java/xdocs/sources/xalan/xsltc_usage.xml
  
  Index: xsltc_usage.xml
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE s1 SYSTEM "../../style/dtd/document.dtd"[
  <!ENTITY xsltc_constraints SYSTEM "xsltc_constraints.xml">]>
  
  <s1 title="Using XSLTC">
  
  <ul>
  <li><link anchor="intro">Introduction</link></li>
    <li><link anchor="classpath">Setting the system classpath for 
XSLTC</link></li>
    <li><link anchor="compile">Compiling translets from the command 
line</link></li>
    <li><link anchor="run">Running translets from the command line</link></li>
    <li><link anchor="api">Using the XSLTC API</link></li>
    <li><link anchor="constraints">XSLTC usage constraints</link></li>  
  </ul>
  <p>See also: <jump href="xsltc/index.html">XSLTC Design</jump></p>
  <anchor name="intro"/>
  <s2 title="Introduction">
  <p>XSLT provides a compiler and a runtime processor. Use the compiler to 
compile an XSL stylesheet into a translet, a set of Java classes. Use the 
runtime processor to apply the translet to an XML document and perform a 
transformation.</p>
  <note>To compile translets, you must be running the JDK or JRE 1.2 or higher. 
You can run translets with the JDK or JRE 1.1.8 or higher.</note>
  </s2><anchor name="classpath"/>
  <s2 title="Setting the system classpath for XSLTC">
  <p>To compile translets, urn translets, and use the XSLTC API, put the 
following on the system classpath:</p>
  <table>
  <tr>
    <th>Classes or JAR</th>
    <th>To compile a translet</th>
    <th>To run a translet</th>
    <th>To use the XSLTC API</th>
  </tr>
  <tr>
    <td>the translet</td>
    <td></td>
    <td>required</td>
    <td>required</td>  
  </tr>
  <tr>
    <td>xsltc.jar</td>
    <td>required</td>
    <td>required</td>
    <td>required</td>  
  </tr>
  <tr>
    <td>xml.jar</td>
    <td>required</td>
    <td>required</td>
    <td>required</td>  
  </tr>
  <tr>
    <td>runtime.jar</td>
    <td>required</td>
    <td></td>
    <td>required</td>  
  </tr>
  <tr>
    <td>BCEL.jar</td>
    <td>required</td>
    <td></td>
    <td>required</td>  
  </tr>
  </table>
  <p>The JAR files listed above are in the &xslt4j; bin directory. The translet 
is the set of class files or the JAR file that you generate with the compiler; 
see <link anchor="compile">Compiling translets</link>.</p>
  <p>If you are using JDK or JRE 1.1.8, also include classes.zip on the 
classpath. If you are using JDK or JRE 1.2, include tools.jar on the 
classpath.</p>
  <note>For the time being, the Xalan processor and XSLT do not yet use the 
same DOM, SAX, and parser infastructures. Accordingly, you may find it 
necessary to reset the system classpath each time you switch between the Xalan 
processor and XSLTC. For information on setting the classpath for the Xalan 
processor, see <link idref="getstarted" anchor="classpath">Setting the system 
classpath for Xalan</link>.</note>
  </s2>
  <anchor name="compile"/>
  <s2 title="Compiling translets from the command line">
      <ul>
        <li><link anchor="comp-synopsis">Synopis</link></li>
        <li><link anchor="comp-args">Flags and arguments</link></li>
        <li><link anchor="comp-examples">Examples</link></li>
      </ul>
        <p>The XSLT Compiler is a Java-based tool for compiling XSLT
        stylesheets into lightweight and portable Java byte codes 
        called translets.</p>  
  
        <p>The XSLT Compiler can be run on any platform including UNIX,
        Windows, NT, or Mac that supports Java 1.2.x or later. The generated
        translets can be run on any platform that supports a Java
        Runtime Environment, including a Palm Pilot with J2ME CLDC 
        (Java 2 Micro Edition, Connected Limited Device Configuration).</p>
      
      <p>To run the compiler from the command line or a script, <link 
anchor="classpath">set the classpath</link> and 
      run the XSLTC class with the appropriate flags and arguments (described 
below).</p>
      <anchor name="comp-synopsis"/>
  <s3 title="Synopsis">
  <p>
  <code>java org.apache.xalan.xsltc.compiler.XSLTC</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;[-o &lt;output&gt;] [-d &lt;directory&gt;] [-j 
&lt;jarfile&gt;]</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;[-p &lt;package name&gt;] [-u] 
&lt;stylesheet&gt;...</code></p> 
  
  </s3><anchor name="comp-args"/>
  <s3 title="Flags and arguments">
        <p>The following flags and arguments are supported:</p>
  
  <source>-o &lt;output&gt;
     Specifies the name of the generated translet class.
     If you omit this argument, the translet class is
     named &lt;stylesheet&gt;. Translets are written as 
     .class files.
  
  -d &lt;directory&gt;
     Specifies the destination directory. If you omit
     this argument, the translet class files are placed
     in the current working directory.
  
  -j &lt;jarfile&gt;
     Outputs the generated translet class files into a 
     jar file named &lt;jarfile&gt;.jar. When this option is 
     used, only the jar file is output.
  
  -p &lt;package name&gt;
     Specifies a package name for the generated translet
     classes.           
  
  -u  &lt;stylesheet&gt;
    Specifies the stylesheet with a URI such as 
    'http://myserver/stylesheet1.xsl'.
  
     &lt;stylesheet&gt;
     (No flag) The pathname of the stylesheet file.</source>
  
  </s3><anchor name="comp-examples"/>
  <s3 title="Examples">
        <p>The following examples assume that you have already set the 
classpath to include the translet and the required JAR
      files (see <link anchor="classpath">setting the system 
classpath</link>).</p>
  
        <p><em>Example 1:</em>  Creating a translet from the hamlet.xsl 
stylesheet.</p>
        <p><code>java org.apache.xalan.xsltc.compiler.XSLTC</code><br/>
      <code>&nbsp;&nbsp;&nbsp;&nbsp; hamlet.xsl</code></p>    
      <p>Example 1 produces a set of class files such as hamlet.class, 
hamlet$0.class, hamlet$1.class.</p>      
  
        <p><em>Example 2:</em>  Outputting to a JAR file.</p>
      <p><code>java org.apache.xalan.xsltc.compiler.XSLTC</code><br/>
      <code>&nbsp;&nbsp;&nbsp;&nbsp; -j hamlet.jar hamlet.xsl</code></p>
      <p>Example 2 produces hamlet.jar, which contains the translet class 
files.</p>    
  
        <p><em>Example 3:</em> Specifying the translet class name. </p> 
        <p><code>java org.apache.xalan.xsltc.compiler.XSLTC</code><br/>
      <code>&nbsp;&nbsp;&nbsp;&nbsp; -o newhamlet hamlet.xsl</code></p>
      <p>Example 3 producs a set of class files such as newhamlet.class, 
newhamlet$0.class, etc., rather than hamlet.class,
      hamles$0.class, etc.</p>
  
  
        <p><em>Example 4:</em> Compiling multiple stylesheets.</p>
        <p><code>java org.apache.xalan.xsltc.compiler.XSLTC</code><br/>
      <code>&nbsp;&nbsp;&nbsp;&nbsp; hamlet1.xsl hamlet2.xsl 
hamlet3.xsl</code></p>
      <p>Example 4 produces three translets and set of class files derived from 
the three stylesheets.</p>
  
        <p><em>Example 5:</em> Package Specification.</p>
        <p><code>java org.apache.xalan.xsltc.compiler.XSLTC</code><br/>
      <code>&nbsp;&nbsp;&nbsp;&nbsp; -p com.mycompany.translets 
hamlet.xsl</code></p>
      <p>Example 5 produces a set of class files such as 
com/mycompany/translets/hamlet.class,
        com/mycompany/translets/hamlet$0.class', etc.</p>
  </s3>
  </s2><anchor name="run"/>
  <s2 title="Running translets from the command line">
      <ul>
        <li><link anchor="run-synopsis">Synopis</link></li>
        <li><link anchor="run-args">Flags and arguments</link></li>
        <li><link anchor="run-examples">Examples</link></li>
      </ul>
  
      <p>The Sun XSLT runtime processor is a Java-based tool for 
        transforming XML document files using a translet (compiled 
        stylesheet). </p>
  
        <p>The XSLT processor can be run on any platform including UNIX,
        Windows, NT, Mac that supports Java, including a Palm Pilot
        with J2ME CLDC (Java 2 Micro Edition, Connected Limited Device
        Configuration).</p>
      
      <p>To run  translet from the command line or a script, <link 
anchor="classpath">set the classpath</link> (be sure to include
       the translet) and run the translset with the appropriate flags and 
arguments (described below).</p>
  <anchor name="run-synopsis"/>
  <s3 title="Synopsis">
  <p><code>java &lt;translet&gt;</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp; {-u &lt;document_url&gt; | &lt;document&gt;} 
&lt;class&gt;</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp; [&lt;name1&gt;=&lt;value1&gt; ...]</code></p>
  
  </s3><anchor name="run-args"/>
  <s3 title="Flags and arguments">
  
        <p>The following flags and arguments are supported:</p>
  
  <source>-u
     Specifies the XML input &lt;document&gt; with a URI,
     such as 'http://myserver/hamlet.xml'.              
  
  Arguments wirhout flags:
  
     &lt;document&gt;                   
     Filename of the XML input document. 
     
     &lt;document_url&gt;       
     URI of the XML input document (see the -u flag above). 
  
     &lt;class&gt;
     The translet that performs the transformation. The translet
     may take a set of stylesheet parameters specified as
     name-value pairs. The format for a name-value pair is
     &lt;name&gt;=&lt;value&gt;.</source>
  </s3><anchor name="run-examples"/>
  <s3 title="Examples">
  
        <p>The following examples assume that you have already set the 
classpath to include the translet and the required JAR
      files (see <link anchor="classpath">setting the system 
classpath</link>).</p>
      <p>A possible variation: You have set the classpath to include the 
required JAR files, but when you run the translet,
      you use the java -cp flag to add the current working directory 
(containing the translet class files you have just generated)
      to the classpath.</p>
      <p><ref>Windows:</ref><code> java -cp .;%CLASSPATH% ...</code><br/>
         <ref>UNIX:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ref><code> java -cp 
.:$CLASSPATH ...</code></p>
      
      <p><em>Example 1:</em> Processing an XML document.</p>
  
        <p><code>java org.apache.xalan.xsltc.runtime.DefaultRun</code><br/>
         <code>&nbsp;&nbsp;&nbsp;&nbsp;  hamlet.xml hamlet</code></p> 
  
        <p>Example 1 uses the specified translet (hamlet) to transform the 
specified XML input document (hamlet.xml). 
      The XML input document is in the current working directory. The translet 
was created by using
      org.apache.xalan.xslt.compiler.XSLTC to compile an XSL stylesheet 
(hamlet.xsl). </p>
  
        <p><em>Example 2:</em> Passing stylesheet parameters to the 
translet.</p>
  
        <p><code>java org.apache.xalan.xsltc.runtime.DefaultRun</code><br/>
         <code>&nbsp;&nbsp;&nbsp;&nbsp; hamlet.xml hamlet</code><br/>
         <code>&nbsp;&nbsp;&nbsp;&nbsp; speaker=HAMLET 'scene=SCENE 
IV'</code></p>
  
        <p>Example 2 passes "HAMLET" to the stylesheet for the stylesheet 
parameter named speaker, and "SCENE IV" for the
      stylesheet parameter named scene. The second name-value pair was placed 
in single quotes to 
      specify a value containing a space.</p>
      
      <p><em>Example 3:</em> Processing an XML input document specified with a 
URI.</p>
  
        <p><code>java org.apache.xalan.xsltc.runtime.DefaultRun</code><br/>
         <code>&nbsp;&nbsp;&nbsp;&nbsp;  -u http://zarya.east/test.xml 
hamlet</code></p>
  
        <p>Example 3 applies the translet (hamlet) to the XML input document 
(http://zarya.east/test.xml hamlet). Inclusion of
      the flag (-u) is optional.</p>
  </s3>
  </s2><anchor name="api"/>
  <s2 title="Using the translet API">
  <p></p>
  </s2><anchor name="constraints"/>
  &xsltc_constraints;
  </s1>
  
  

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

Reply via email to