dleslie     00/12/21 05:15:27

  Modified:    java/xdocs/sources/xalan DONE usagepatterns.xml
  Log:
  Updates for beta release.
  
  Revision  Changes    Path
  1.8       +2 -1      xml-xalan/java/xdocs/sources/xalan/DONE
  
  Index: DONE
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/DONE,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DONE      2000/12/19 16:02:38     1.7
  +++ DONE      2000/12/21 13:15:26     1.8
  @@ -3,7 +3,7 @@
   <p>The remainder of this section discusses two changes that we believe are 
of particular importance:</p>
   <p><em>TrAX</em></p>
   <p>The Transformation API for XML (TrAX) that &xslt4j2; implements has 
undergone substantial revisions since the release of &xslt4j; 2.0.D01. TrAX has 
joined the Java API for XML Parsing (JAXP) as part of the Sun&reg; 
<resource-ref idref="jsr063"/>. Accordingly, the TrAX package names have 
changed. The conceptual organization has also changed somewhat: The primary 
transformation interfaces are defined in javax.xml.transform, with concrete 
classes for managing stream input/output, SAX parsers and ContentHandler, and 
DOM parsers and DOM trees in javax.xml.transform.stream, 
javax.xml.transform.sax, and javax.xml.transform.dom. For more information, see 
<resource-ref idref="trax"/>, and review <link idref="usagepatterns">Usage 
Patterns</link>.</p>
  -<p><em>Output properties</em></p>
  +<anchor name="outputprops"/><p><em>Output properties</em></p>
   <p>The handling of xsl:output properties has changed: 
org.apache.xalan.serialize.OutputFormat and 
apache.xalan.templates.OutputFormatExtended were removed and replaced with 
org.apache.xalan.templates.OutputProperties. The SerializerFactory 
getSerializer() method now takes Properties rather than a String indicating the 
output method. You can replace <code>getSerializer("xml")</code>, for example, 
with 
<code>getSerializer(OutputProperties.getDefaultMethodProperties("xml"))</code>.</p>
   <p>HTML, XML, and text xsl:output properties are specified in property files 
in org.apache.xalan.templates: output_html.properties, output_xml.properties, 
and output_text.properties.</p>
   <p>You can start using the output properties defined in these files in your 
stylesheets. For example, you can turn URL escaping off in HTML output, by 
setting use-url-escaping=no, and you can set indent-amount to control 
indenting.</p>
  @@ -29,4 +29,5 @@
   <p>The output is:</p>
   <source>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;out&gt;&amp;lala;&lt;/out&gt;</source>
  +<p>See also <link idref="usagepatterns" anchor="outputprops">Setting output 
properties in your stylesheets</link>.</p>
   </s3>
  
  
  
  1.20      +67 -2     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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- usagepatterns.xml 2000/12/18 21:24:04     1.19
  +++ usagepatterns.xml 2000/12/21 13:15:26     1.20
  @@ -60,6 +60,7 @@
   <ul>
   <li><link anchor="basic">Basic steps</link></li>
   <li><link anchor="plug">Plugging in the Transformer and XML 
parser</link></li>
  +<li><link anchor="outputprops">Setting output properties in your 
styleshets</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>
  @@ -125,8 +126,72 @@
     <label><code>javax.xml.parsers.SAXParserFactory</code></label>
      <item><code>org.apache.xerces.jaxp.SAXParserFactoryImpl</code></item>
    </gloss>  
  -<p>For information about the mechanism used to determine system property 
values and how you can plug other implementations into your applications, see 
"Section 3: Pluggability Layer" in the <ref>Java&#153; API for XML 
Processing</ref> at 
  +<p>For information about the mechanism used to determine system property 
values and how you can plug other implementations into your applications, see 
"Section 3: Pluggability Layer" in the <ref>Java API for XML Processing</ref> 
at 
   <jump 
href="http://java.sun.com/aboutJava/communityprocess/review/jsr063/index.html";>JSR-000063
 1.1</jump>.</p> 
  +</s2><anchor name="outputprops"/>
  +<s2 title="Setting output properties in your stylesheets">
  +<p>Output properties for XML, HTML, and Text transformation output are 
defined in property files in the org.apache.xalan.templates package.</p>
  +<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
  +      element (for example, xalan:indent-amount="5").</li>
  +</ol>
  +  <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>
  +<p><ref>output_xml.properties</ref>:</p>
  +<table>
  +  <tr>
  +    <th>Property</th>
  +    <th>Default value</th>
  +  </tr>  
  +  <tr>
  +    <td>xalan:indent-amount</td>
  +    <td>0</td>
  +  </tr>
  +  <tr>
  +    <td>xalan:content-handler</td>
  +    <td>org.apache.xalan.serialize.FormatterToXML</td>
  +  </tr>
  +</table>
  +<p><ref>output_html.properties</ref>:</p>
  +<table>
  +  <tr>
  +    <th>Property</th>
  +    <th>Default value</th>
  +  </tr>  
  +  <tr>
  +    <td>xalan:indent-amount</td>
  +    <td>0</td>
  +  </tr>
  +  <tr>
  +    <td>xalan:content-handler</td>
  +    <td>org.apache.xalan.serialize.FormatterToHTML</td>
  +  </tr>
  +  <tr>
  +    <td>entities</td>
  +    <td>HTMLEntities.res</td>
  +  </tr>
  +  <tr>
  +    <td>xalan:use-url-escaping</td>
  +    <td>yes</td>
  +  </tr>
  +</table>
  +<note>You can also create your own HTML entity file (mapping characters to 
entities) 
  +or edit src/org/apache/xalan/serialize/HTMLEntities.res and rebuild 
xalan.jar.</note>
  +<p><ref>output_text.properties</ref>:</p>
  +<table>  
  +  <tr>
  +    <th>Property</th>
  +    <th>Default value</th>
  +  </tr>
  +  <tr>
  +    <td>xalan:content-handler</td>
  +    <td>org.apache.xloan.serialize.FormatterToText</td>
  +  </tr>
  +</table>
  +<p>See also <link idref="readme" anchor="outputprops">Release Notes: Output 
Properties</link>.</p>
   </s2><anchor name="embed"/>
   <s2 title="Working with embedded stylesheets">
   <p>An XML Source may include an <jump 
href="http://www.w3.org/TR/xml-stylesheet/";>xml-stylesheet processing 
instruction</jump> which identifies the stylesheet to be used to process the 
document. As indicated by the processing instruction <ref>href</ref> attribute, 
the stylesheet itself may be embedded in the XML document or located 
elsewhere.</p>
  @@ -277,7 +342,7 @@
   <source>&lt;applet  
       name="xslControl"
       code="org.apache.xalan.client.XSLTProcessorApplet.class"
  -    archive="xalan.jar,xerces.jar"
  +    archive="../../bin/xalan.jar,../../bin/xerces.jar"
       height="0"
       width"0">
       &lt;param name="documentURL" value="xalanApplets.xml"/&gt;
  
  
  

Reply via email to