dleslie 00/12/08 06:19:29
Modified: java/xdocs/sources/xalan index.xml samples.xml
usagepatterns.xml
Log:
Editorial updates.
Revision Changes Path
1.7 +1 -1 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.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- index.xml 2000/12/07 17:05:56 1.6
+++ index.xml 2000/12/08 14:19:27 1.7
@@ -63,7 +63,7 @@
in an applet or a servlet, or as a module in other program.</p>
</s2>
<s2 title="I've heard of &xslt4j;, but what is version 2?">
- <p>&xslt4j; version 2 recasts Xalan as an implementation of the
<resource-ref idref="trax"/> interfaces, part of the <resource-ref
idref="jaxp"/>. TRaX provides a
+ <p>&xslt4j; version 2 recasts Xalan as an implementation of the
<resource-ref idref="trax"/> interfaces, part of the <resource-ref
idref="jaxp11"/>. TRaX provides a
modular framework and a standard API for performing XML transformations,
and it utilizies system properties to determine which Transformer and which XML
parser to use.</p>
<p>&xslt4j; version 2 also builds on <resource-ref idref="sax2"/>,
<resource-ref idref="dom2"/>, and the XML parser API in
<resource-ref idref="jaxp"/>.</p>
1.17 +1 -1 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.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- samples.xml 2000/12/07 22:11:58 1.16
+++ samples.xml 2000/12/08 14:19:28 1.17
@@ -278,7 +278,7 @@
Interface</link></p>
</s2><anchor name="trax"/>
<s2 title="trax">
- <p>What it does: run a number of samples illustrating uses of the <link
idref="trax"/> interfaces.</p>
+ <p>What it does: run a number of samples illustrating uses of the
<resource-ref idref="trax"/> 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>
1.18 +5 -0 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.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- usagepatterns.xml 2000/12/07 17:05:57 1.17
+++ usagepatterns.xml 2000/12/08 14:19:28 1.18
@@ -62,6 +62,7 @@
<li><link anchor="plug">Plugging in the Transformer and XML
parser</link></li>
<li><link anchor="embed">Working with embedded stylesheets</link></li>
<li><link anchor="params">Setting stylesheet parameters</link></li>
+<li><link anchor="serialize">Serializing output</link></li>
<li><link anchor="sax">Explicitly working with SAX</link></li>
<li><link anchor="outasin">Using transformation output as input for another
transformation</link></li>
<li><link anchor="dom">Processing and producing DOM trees</link></li>
@@ -156,6 +157,9 @@
<li>Include the <code>-in</code> flag with an XML source that contains a
stylesheet processing instruction.<br/><br/></li>
<li>Do not include the <code>-xsl</code> flag.</li>
</ol>
+</s2><anchor name="serialize"/>
+<s2 title="Serializing output">
+<p>In some cases, you may want to "transform" a DOM tree into a stream,
which the XML community calls serialization. <resource-ref idref="trax"/> and
the &xslt4j; Transformer implementation provide direct support for this
operation. Simply use the TransformerFactory newTransformer() method (no
arguments) to create a Transformer that you can use to "copy" a DOMSource to a
StreamResult. For examples, see Examples.exampleDOM2DOM(),
Examples.exampleSerializeNode(), and Examples.exampleAsSerializer() in the
<link idref="samples" anchor="trax">trax sample</link>.</p>
</s2><anchor name="params"/>
<s2 title="Setting stylesheet parameters">
<p>An XSLT stylesheet may include parameters that are set at run time each
time a transformation is performed. To set a stylesheet parameter, use the
Transformer <jump
href="apidocs/org/apache/trax/Transformer.html#setParameter(java.lang.String,java.lang.Object)">setParameter(String
name, Object value)</jump> method. For a working example, see
UseStylesheetParam.java in the samples/UseStylesheetParam subdirectory.</p>
@@ -294,6 +298,7 @@
<li>Use the TransformerFactory <jump
href="apidocs/javax/xml/transform/TransformerFactory.html#newTemplates(javax.xml.transform.Source)">newTemplates(Source
xslSource)</jump> method to create a Templates object.<br/><br/></li>
<li>For each transformation, use the Templates object <jump
href="apidocs/javax/xml/transform/Templates.html#newTransformer()">newTransformer()</jump>
method to create a Transformer, and use that Transformer's <jump
href="apidocs/javax/xml/transform/Transformer.html#transform(javax.xml.transform.Source,
javax.xml.transform.Result)">transform(Source xmlSource, Result
transformResult)</jump> method to perform the transformation.</li>
</ol>
+<p>For an example, see Examples.exampleUseTemplatesObj() in the <link
idref="samples" anchor="trax">trax sample</link>.</p>
</s2><anchor name="debugging"/>
<s2 title="Debugger Interface">
<p>&xslt4j; contains a debugger interface in the
org.apache.xalan.xslt.trace package:</p>