dleslie 01/05/18 09:51:19
Modified: java/xdocs/sources/xalan getstarted.xml xsltc_usage.xml
Log:
Removed ref to -Validate option.
More detail on using JAXP to generate and use translets.
Revision Changes Path
1.13 +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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- getstarted.xml 2001/05/10 18:09:44 1.12
+++ getstarted.xml 2001/05/18 16:51:16 1.13
@@ -48,7 +48,7 @@
<code> -xsl <ref>stylesheet</ref> -out
<ref>outputfile</ref></code></p>
<p>where <ref>xmlSource</ref> is the XML source file name,
<ref>stylesheet</ref> is the XSL stylesheet file name, and
<ref>outputfile</ref> is the output file name.</p>
<p>If you want the output to be displayed on the screen, simply omit the
-out flag and argument.</p>
-<p>You can use this utility to try out XSL stylesheets you have written, to
make sure they do what you expect with the XML source files they are designed
to transform. The utility provides useful messages if the source file or
stylesheet is not well formed. If you include a DOCTYPE statement in your XML
source files and include the -validate flag on the command line, the utility
will also let you know whether the XML document is valid (conforms to that
DOCTYPE). For more information, see <link idref="commandline">Command-Line
Utility</link>.</p>
+<p>You can use this utility to try out XSL stylesheets you have written, to
make sure they do what you expect with the XML source files they are designed
to transform. The utility provides useful messages if the source file or
stylesheet is not well formed. For more information, see <link
idref="commandline">Command-Line Utility</link>.</p>
</s2><anchor name="java-apps"/>
<s2 title="Setting up your own Java applications">
<p>You can start by using your own XML source files and XSL stylesheets with
the sample applications, which illustrate a number of the <link
idref="usagepatterns">basic usage patterns</link>.</p>
1.14 +5 -3 xml-xalan/java/xdocs/sources/xalan/xsltc_usage.xml
Index: xsltc_usage.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/xsltc_usage.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- xsltc_usage.xml 2001/05/17 16:41:33 1.13
+++ xsltc_usage.xml 2001/05/18 16:51:17 1.14
@@ -312,7 +312,7 @@
<p>G. Todd Miller has begun integrating the translet with the TrAX/JAXP 1.1
API. See <jump href="xsltc/xsltc_trax.html">The Translet API & TrAX</jump>.
Accordingly, it is now possible to set a system property and use a
TransformerFactory to generate a Transformer that performs a transformation by
compiling and running a translet.</p>
-<p>When you use the JAXP 1.1 API to run &xslt4j;, the
<code>javax.xml.transformer.TransformerFactory</code> system property is set to
<code>org.apache.xalan.Processor.TransformerFactoryImpl</code>. As it currently
stands, this Xalan implementation of TransformerFactory always uses the Xalan
Transformer to perform transformations. To use translets to perform
transformations, set this system property to
<code>org.apache.xalan.xsltc.runtime.TransformerFactoryImpl</code>. For
information on setting this and related system properties designating XML
parsere and XSL transformer, see <link idref="usagepatterns"
anchor="plug">Plugging in a Transformer and XML parser</link>.</p>
+<p>When you use the JAXP 1.1 API to run &xslt4j;, the
<code>javax.xml.transformer.TransformerFactory</code> system property is set to
<code>org.apache.xalan.processor.TransformerFactoryImpl</code>. As it currently
stands, this Xalan implementation of TransformerFactory always uses the Xalan
Transformer to perform transformations. To use translets to perform
transformations, set this system property to
<code>org.apache.xalan.xsltc.runtime.TransformerFactoryImpl</code>. For
information on setting this and related system properties designating XML
parsere and XSL transformer, see <link idref="usagepatterns"
anchor="plug">Plugging in a Transformer and XML parser</link>.</p>
<p>To Use the JAXP 1.1 API to perform transformations with translets do the
following:</p>
<ol>
<li>Set the <code>javax.xml.transformer.TransformerFactory</code> system
property as indicated above.<br/><br/></li>
@@ -327,6 +327,7 @@
<p><em>Example 1:</em> Using a translet/Templates object for multiple
transformations</p>
<source>import java.util.Properties;
import javax.xml.transform.Transformer;
+import java.io.FileOutputStream;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Templates;
import javax.xml.transform.stream.StreamSource;
@@ -352,12 +353,13 @@
// the transformation from a StreamSource to a StreamResult;
Transformer transformer = translet.newTransformer();
transformer.transform(new StreamSource(xmlInURI),
- new StreamResult(htmlOutURI));
+ new StreamResult(new FileOutputStream(htmlOutURI)));
...</source>
<p>For a working sample that illustrates this usage pattern, see <link
idref="samples" anchor="xsltc1">JAXPTransletOneTransformation</link>.</p>
<p><em>Example 2:</em> Compiling a translet/Templates object for a single
transformation</p>
<source>import java.util.Properties;
import javax.xml.transform.TransformerFactory;
+import java.io.FileOutputStream;
import javax.xml.transform.Transformer;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
@@ -378,7 +380,7 @@
Transformer transformer = tFactory.newTransformer(new
StreamSource(xslInURI));
// Perform the transformation from a StreamSource to a StreamResult;
transformer.transform(new StreamSource(xmlInURI),
- new StreamResult(htmlOutURI));</source>
+ new StreamResult(new
FileOutputStream(htmlOutURI)));</source>
<p>For a working sample that illustrates this usage pattern, see <link
idref="samples" anchor="xsltc2">JAXPTransletMultipleTransformations</link>.</p>
</s3>
</s2><anchor name="constraints"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]