mkwan       2003/02/04 12:36:17

  Modified:    java/xdocs/sources/xalan extensions.xml samples.xml
  Log:
  xdocs update
  In samples.xml, update the documentation for the ApplyXSLT sample to provide
  more information about the input xml and stylesheet.
  In extensions.xml, add documentation for the src attribute in xalan:script.
  
  Revision  Changes    Path
  1.23      +5 -2      xml-xalan/java/xdocs/sources/xalan/extensions.xml
  
  Index: extensions.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/extensions.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- extensions.xml    27 Jan 2003 18:45:36 -0000      1.22
  +++ extensions.xml    4 Feb 2003 20:36:17 -0000       1.23
  @@ -193,7 +193,7 @@
   <p>To run the preceding example, bsf.jar and js.jar must be on the 
classpath. Remember that bsf.jar must be on the classpath to run any extension 
written in a language other than Java. For extensions implemented in a 
scripting language, see the additional requirements in <link 
anchor="supported-lang">Supported languages</link>.</p>
   </s2><anchor name="basic-syntax"/>
   <s2 title="Syntax">
  -<p>You can always use the pattern illustrated above to set up and use 
extension elements and extension functions. For extension elements and 
functions implemented in Java, you can also use an abbreviated syntax, 
described in <link anchor="java-namespace">Alternative: using the abbreviated 
syntax for extensions implemented in Java</link>. Unless you are using the 
abbreviated syntax, do the following:</p>
  +<p>You can always use the pattern illustrated above to set up and use 
extension elements and extension functions. For extension elements and 
functions implemented in Java, it is recommended that you use the abbreviated 
syntax, described in <link anchor="java-namespace">Alternative: using the 
abbreviated syntax for extensions implemented in Java</link>. Unless you are 
using the abbreviated syntax, do the following:</p>
   <s3 title="1. Declare the xalan namespace">
   <p><br/><code>xmlns:xalan="http://xml.apache.org/xalan";</code></p>
   <p>The xalan namespace provides support for the xalan:component element and 
xalan:script subelement.</p>
  @@ -235,7 +235,10 @@
   <p><code>&lt;xalan:script lang="javascript" &gt;</code><br/>
   <code>&nbsp;&nbsp;&lt;!--The implementation script--&gt;</code><br/>
   <code>&lt;/xalan:script&gt;</code></p>
  -<p>For other scripting languages supported by BSF, use the same approach as 
for JavaScript. &xslt4j; plans to add support for using the src attribute to 
identify another document that contains the implementation script; this feature 
is not yet supported.</p>
  +<p>For other scripting languages supported by BSF, use the same approach as 
for JavaScript. 
  +The src attribute is also supported in the xalan:script element. If it is 
present, the script will
  +be loaded from the URL specified in the src attribute. Otherwise the script 
is taken from the text child
  +of the xalan:script element.</p>
   <p>If the extension is implemented in Java, you have three choices for the 
format of the src attribute in the xalan:script element.</p>
   <p><code>&lt;xalan:script lang="javaclass" 
src="xalan://<ref>FQCN</ref>"/&gt;</code>
   <br/>where <ref>FQCN</ref> is the fully qualified class name.
  
  
  
  1.50      +17 -13    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.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- samples.xml       27 Jan 2003 18:45:36 -0000      1.49
  +++ samples.xml       4 Feb 2003 20:36:17 -0000       1.50
  @@ -285,27 +285,31 @@
       <p>To run the servlet: put xalanservlet.jar on the servlet engine 
classpath, configure your servlet engine so it can find the 
        stylesheets and properties file in the servlet subdirectory (and in 
xalanservlet.jar), and set up an HTML page to call
        servlet.ApplyXSLT with arguments as illustrated below.</p>
  +    <p>The files foo.xml and foo.xsl used in the following example are 
created by the user. Good 
  +    examples for these files are birds.xml/birds.xsl and foo.xml/foo.xsl 
under the SimpleTransform 
  +    sample. 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/servlethome/servlet.ApplyXSLT?URL=/data.xml&amp;xslURL=
  -/style.xsl</label>
  -<item>...applies the style.xsl stylesheet to the data.xml data. Both files 
are<br/>
  
+<label>http://localhost/servlethome/servlet.ApplyXSLT?URL=/foo.xml&amp;xslURL=
  +/foo.xsl</label>
  +<item>...applies the foo.xsl stylesheet to the foo.xml data. Both files 
are<br/>
   served from the Web server's HTTP document root.<br/><br/></item>
  
-<label>http://localhost/servlethome/servlet.ApplyXSLT?URL=/data.xml&amp;xslURL=
  -/style.xsl&amp;debug=true</label>
  
+<label>http://localhost/servlethome/servlet.ApplyXSLT?URL=/foo.xml&amp;xslURL=
  +/foo.xsl&amp;debug=true</label>
   <item>...ensures that XML and XSL processor messages are returned in the 
event of problems
  -applying style.xsl to data.xml<br/><br/></item>
  
-<label>http://localhost/servlethome/servlet.ApplyXSLT/data.xml?xslURL=/style.xsl</label>
  -<item>...applies the style.xsl stylesheet to the data.xml data, just like 
the first example.
  +applying foo.xsl to foo.xml<br/><br/></item>
  
+<label>http://localhost/servlethome/servlet.ApplyXSLT/foo.xml?xslURL=/foo.xsl</label>
  +<item>...applies the foo.xsl stylesheet to the foo.xml data, just like the 
first example.
   This is an alternative way of specifying the XML XSLTInputSource by 
utilizing the HTTP request's path
   information.<br/><br/></item>
  -<label>http://localhost/servlethome/servlet.ApplyXSLT/data.xml</label>
  -<item>...examines data.xml for an associated XSL stylesheet (a stylesheet 
Processing Instruction). If multiple XSLs are associated with the data, the 
stylesheet whose media attribute maps to your browser type will be chosen.  If 
no mapping is successful, the primary associated stylesheet is 
used.<br/><br/></item>
  -<label>http://localhost/servlet/data.xml</label>
  +<label>http://localhost/servlethome/servlet.ApplyXSLT/foo.xml</label>
  +<item>...examines foo.xml for an associated XSL stylesheet (a stylesheet 
Processing Instruction). If multiple XSLs are associated with the data, the 
stylesheet whose media attribute maps to your browser type will be chosen.  If 
no mapping is successful, the primary associated stylesheet is 
used.<br/><br/></item>
  +<label>http://localhost/servlet/foo.xml</label>
   <item>...provides the same function as the previous example, but this 
example assumes
  -that /servlet/data.xml has been mapped to be executed by this servlet.  The 
servlet engine may be configured
  +that /servlet/foo.xml has been mapped to be executed by this servlet.  The 
servlet engine may be configured
   to map all or some *.xml files to this servlet through the use of servlet 
aliases or filters.<br/><br/></item>
  
-<label>http://localhost/servlet/data.xml?catalog=http://www.xml.org/dtds/oag.xml</label>
  
+<label>http://localhost/servlet/foo.xml?catalog=http://www.xml.org/dtds/oag.xml</label>
   <item>...supplements any servlet-configured XCatalog
   with a catalog of supply chain DTDs residing at the XML.ORG DTD 
repository.</item>
   </gloss>     
  
  
  

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

Reply via email to