You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mc...@apache.org on 2005/08/05 01:12:23 UTC

cvs commit: xml-xalan/java/xdocs/sources/xalan extensionslib.xml

mcnamara    2005/08/04 16:12:23

  Modified:    java/xdocs/sources/xalan extensionslib.xml
  Log:
  Doc updates for the SQL extension (part of the fix for XALANJ-2172).
  Patch provided by John Gentilin and reviewed by Sarah McNamara.
  
  Revision  Changes    Path
  1.33      +237 -171  xml-xalan/java/xdocs/sources/xalan/extensionslib.xml
  
  Index: extensionslib.xml
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/extensionslib.xml,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- extensionslib.xml	19 Jul 2005 17:37:58 -0000	1.32
  +++ extensionslib.xml	4 Aug 2005 23:12:23 -0000	1.33
  @@ -221,6 +221,7 @@
   
   </s3>
   </s2>
  +
   <anchor name="nodeinfo"/>
   <s2 title="NodeInfo">
   <p><jump href="apidocs/org/apache/xalan/lib/NodeInfo.html">org.apache.xalan.lib.NodeInfo</jump> provides 
  @@ -237,19 +238,24 @@
   You can use the <link idref="commandline">command-line utility</link> -L flag or the 
   <jump href="apidocs/javax/xml/transform/TransformerFactory.html#setAttribute(java.lang.String, 
   java.lang.Object)">TransformerFactory.setAttribute()</jump> method to set this attribute.</note>
  +
   <anchor name="systemid"/>
   <s3 title="systemId">
   <p>Implemented in <jump href="apidocs/org/apache/xalan/lib/NodeInfo.html">
   org.apache.xalan.lib.NodeInfo</jump>,
   <code>systemId()</code> returns the system ID for the current node, and
   <code>systemId(node-set)</code> returns the system ID of the first node in the node-set.</p>
  -</s3><anchor name="publicid"/>
  +</s3>
  +
  +<anchor name="publicid"/>
   <s3 title="publicId">
   <p><em>To be done.</em> Implemented in <jump href="apidocs/org/apache/xalan/lib/NodeInfo.html">
   org.apache.xalan.lib.NodeInfo</jump>,
   <code>publicId()</code> will return the public ID for the current node, and
   <code>publicId(node-set)</code> will return the public ID of the first node in the node-set.</p>
  -</s3><anchor name="linenumber"/>
  +</s3>
  +
  +<anchor name="linenumber"/>
   <s3 title="lineNumber">
   <p>Implemented in <jump href="apidocs/org/apache/xalan/lib/NodeInfo.html">
   org.apache.xalan.lib.NodeInfo</jump>,
  @@ -258,7 +264,9 @@
   in the node-set.</p>
   <note>This function returns -1 if the line number is not known (for example, the source is a 
   DOM Document).</note>
  -</s3><anchor name="columnnumber"/>
  +</s3>
  +
  +<anchor name="columnnumber"/>
   <s3 title="columnNumber">
   <p>Implemented in <jump href="apidocs/org/apache/xalan/lib/NodeInfo.html">
   org.apache.xalan.lib.NodeInfo</jump>, <code>columnNumber()</code> returns the column number in the 
  @@ -266,143 +274,195 @@
   number in the source document for the first node in the node-set.</p>
   <note>This function returns -1 if the column number is not known (for example, the source is a DOM 
   Document).</note>
  -</s3></s2><anchor name="sql"/>
  +</s3>
  +</s2>
  +
  +<anchor name="sql"/>
   <s2 title= "SQL library">
  -<!--<note>For UML Diagrams of the SQL Library, see 
  -<jump href="http://xml.apache.org/xalan-j/Xalan-SQL-Extension/DiagramIndex.html">SQL Library 
  -UML Diagrams</jump>.</note> -->
   <ul>
  -<li><link anchor="sqlconn">Setting up a connection</link></li>
  -<li><link anchor="sqlparam">Parameterized queries</link></li>
  -<li><link anchor="ex-sql">SQL library example</link></li>
  -<li><link idref="samples" anchor="sql">SQL library sample applications</link></li>
  + <li><link anchor="sqlconn">Setting up a connection</link></li>
  + <li><link anchor="sqlparam">Parameterized queries</link></li>
  + <li><link anchor="ex-sql">SQL library example</link></li>
  + <li><link idref="samples" anchor="sql">SQL library sample applications</link></li>
   </ul>
   <p>The namespace for the SQL extension is:</p>
  -<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>http://xml.apache.org/xalan/sql</code></p>
  -<p>The SQL extension provides extension functions for connecting to a JDBC data source, executing 
  -a query, and working incrementally through a "streamable" result set. Streaming (reuse of a single 
  -row node to traverse the result set) is the default mode of operation. If you want unlimited access 
  -to the entire result set, you can cache the query result set (1 row node for each row in the result 
  -set).</p>
  -<p><em>If you use streaming mode (the default), you can only access row elements one at a time moving 
  -forward through the result set. The use of XPath expressions in your stylesheet, for example, that 
  -attempt to return nodes from the result set in any other manner may produce unpredictable 
  -results.</em></p>
  -<note>Many features of the SQL library, including support for connection pools, parameterized queries, 
  -caching, and added support for extracting connection information and query parameters from XML source 
  -documents exist thanks to John Gentilin (johnglinux@eyecatching.com), who has also added a number 
  -of <link idref="samples" anchor="sql">SQL library samples</link>.</note>
  -<p><jump href="apidocs/org/apache/xalan/lib/sql/XConnection.html">
  -org.apache.xalan.lib.sql.XConnection</jump> provides a number of extension functions that you can 
  -use in your stylesheet.</p>
  -    <ol>
  -      <li>new() -- Use one of the XConnection constructors to connect to a data source, and return an 
  -       XConnection object. You can use one of the constructors creates a connection pool from which 
  -       stylesheets can obtain connections to a datasource. To support connection pools, SQL library 
  -       includes a ConnectionPool interface and a implementation: DefaultConnectionPool. You can also 
  -       provide your own ConnectionPool implementation.<br/><br/></li>
  -      <li>query() -- Use the XConnection object query() method to return a "streamable" result set in 
  -       the form of a row-set node. Work your way through the row-set one row at a time. The same row 
  -       element is used over and over again, so you can begin "transforming" the row-set before the 
  -       entire result set has been returned.<br/><br/></li>
  -       <li>pquery(), addParameter(), addParameterFromElement(), clearParameters() -- Use the XConnection 
  -       pquery() method in conjunction with these other methods to set up and execute parameterized 
  -       queries.<br/><br/></li>
  -       <li>Use enableStreamingMode() to use a single row node to "stream" through the result set, and 
  -       disableStreamingMode() to cache the query result set. <br/><br/></li>
  -      <li>close() -- Use the XConnection object close() method to terminate the connection.</li>      
  -    </ol>
  -    <p>The query() and pquery() extension functions return a Document node that contains (as needed) 
  -    an array of column-header elements, a single row element that is used repeatedly, and an array 
  -    of col elements. Each column-header element (one per column in the row-set) contains an attribute 
  -    (ColumnAttribute) for each of the column descriptors in the ResultSetMetaData object.  Each col 
  -    element contains a text node with a textual representation of the value for that column in the 
  -    current row.</p>
  -    <anchor name="sqlconn"/>
  -    <s3 title="Setting up a connection">
  -    <p>You can place connection information (JDBC driver, datasource URL, and usually user ID and 
  -     password) in stylesheets or in XML source documents.</p> 
  -     <p>The following stylesheet fragment uses stylesheet parameters to designate a JDBC driver and 
  -     datasource. The default parameter values can be overridden with runtime parameter values.</p>
  -     <source>&lt;xsl:param name="driver" select="'org.enhydra.instantdb.jdbc.idbDriver'"/&gt;
  -&lt;xsl:param name="datasource" select="'jdbc:idb:../../instantdb/sample.prp'"/&gt;
  -&lt;xsl:param name="query" select="'SELECT * FROM import1'"/&gt;</source>
  -      <p>You can also obtain connection information from the XML source document that you use for the 
  -      transformationl. Suppose you have the following DBINFO nodeset in an XML document:</p>
  -      <source>&lt;DBINFO&gt;
  -  &lt;dbdriver&gt;org.enhydra.instantdb.jdbc.idbDriver&lt;/dbdriver&gt;
  -  &lt;dburl&gt;jdbc:idb:../../instantdb/sample.prp&lt;/dburl&gt;
  -  &lt;user&gt;jbloe&lt;/user&gt;
  -  &lt;password&gt;geron07moe&lt;/password&gt;
  -&lt;/DBINFO&gt;</source>
  -       <p>In the stylesheet, you can extract this information as follows:</p>
  -       <source>&lt;xsl:stylesheet version 1.0
  -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:sql="http://xml.apache.org/xalan/sql"
  -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extension-element-prefixes="sql"&gt;
  -&nbsp;&nbsp;&lt;xsl:param name="cinfo" select="//DBINFO"/&gt;
  -&nbsp;&nbsp;&lt;xsl:variable name="db" select="sql:new($cinfo)"/&gt;
  -....</source> 
  -      <p>For an example of both approaches, see <link idref="samples" anchor="basic-conn">Basic 
  -      Connection</link> samples.</p>
  -      <p>You can also create a named connection pool that is maintained external to &xslt4j;.</p>
  -      <source>import org.apache.xalan.lib.sql.DefaultConnectionPool;
  -import org.apache.xalan.lib.sql.XConnectionPoolManager;
  -...
  -DefaultConnectionPool cp = new DefaultConnectionPool();
  -cp.setDriver("org.enhydra.instantdb.jdbc.idbDriver");
  -cp.setURL("jdbc:idb:../../instantdb/sample.prp");
  -cp.setUser("jbloe");
  -cp.setPassword("geron07moe");
  -// Start with 10 connections.
  -cp.setMinConnections(10);
  -cp.enablePool();
  -// Register the connection pool so stylesheets can use it.
  -XConnectionPoolManager pm = new XConnectionPoolManager();
  -pm.registerPool("extpool", cp);</source>
  -      <p>A stylesheet can use this connection pool as follows:</p>
  -      <source>&lt;xsl:stylesheet version 1.0
  -     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  -     xmlns:sql="http://xml.apache.org/xalan/sql"
  -     extension-element-prefixes="sql"&gt;
  -...
  -  &lt;xsl:variable name="db" select="sql:new($driver, 'extpool')"/&gt;</source>
  -      <p>For an example, see the <link idref="samples" anchor="ext-conn">ExternalConnection</link> sample.</p>
  -    </s3><anchor name="sqlparam"/>
  -    <s3 title="Parameterized queries">
  -      <p>To define a parameterized query, use a SQL query string with a question mark (?) for each 
  -      parameter. You can provide 
  -      the parameter values at runtime with stylesheet parameters or with nodes in the XML source document. 
  -      For each parameter, you should also designate the SQL data type.</p>
  -      <p>XConnection provides a number of addParameter() methods and an addParameterFromElement() method 
  -      that you can use as extension functions to pull in the parameter values (in the order the 
  -      parameters appear in the query). To execute the query and return the result set, call the pquery() 
  -      method as an extension function. There are two variations of the pquery() method. The one you 
  -      should ordinarily use includes as arguments the SQL query string and a string list 
  -      (delimited by the space, tab, or line feeds) of parameter types. For example:</p>
  -      <source>&lt;xsl:variable name="resultset" 
  +  <code>http://xml.apache.org/xalan/sql</code>
  +<p>
  + The SQL extension provides extension functions for connecting to a JDBC data source, 
  + executing a query, and working incrementally through a "streamable" result set. Streaming 
  + (reuse of a single row node to traverse the result set) is the default mode of operation. 
  + if you want unlimited access to the entire result set, you can cache the query result set 
  + (1 row node for each row in the result set).</p>
  +<p><em>If you use streaming mode (the default), you can only access row elements one at a time 
  + moving forward through the result set. The use of XPath expressions in your stylesheet, for 
  + example, that attempt to return nodes from the result set in any other manner may produce 
  + unpredictable results.</em></p>
  + <note>Many features of the SQL library, including support for connection pools, parameterized 
  + queries, caching, and added support for extracting connection information and query parameters 
  + from XML source documents exist thanks to John Gentilin (johnglinux@eyecatching.com), who has 
  + also added a number of <link idref="samples" anchor="sql">SQL library samples</link>.
  +</note>
  +<p><jump href="apidocs/org/apache/xalan/lib/sql/XConnection.html">org.apache.xalan.lib.sql.XConnection</jump> 
  + provides a number of extension functions that you can use in your stylesheet.</p>
  +<ol>
  +<li>new() -- Use one of the XConnection constructors to connect to a data source, and return an 
  +XConnection object. You can use one of the constructors creates a connection pool from which 
  +stylesheets can obtain connections to a datasource. To support connection pools, SQL library 
  +includes a ConnectionPool interface and a implementation: DefaultConnectionPool. You can also 
  +provide your own ConnectionPool implementation.<br/><br/></li>
  +<li>query() -- Use the XConnection object query() method to return a "streamable" result set in 
  +the form of a row-set node. Work your way through the row-set one row at a time. The same row 
  +element is used over and over again, so you can begin "transforming" the row-set before the 
  +entire result set has been returned.<br/><br/></li>
  +<li>pquery(), addParameter(), addParameterFromElement(), clearParameters() -- 
  +Use the XConnection pquery() method in conjunction with these other methods to 
  +set up and execute parameterized queries.<br/><br/></li>
  +<li>Use enableStreamingMode() to use a single row node to "stream" through the result set, and 
  +disableStreamingMode() to cache the query result set. <br/><br/>
  +<note>
  +enableStreamingMode and disableStreamingMode() are depricated
  +See <link idref="extensionslib" anchor="sql-ext-features">SQL Extension Features</link>.
  +</note><br/></li>
  +<li>close() -- Use the XConnection object close() method to terminate the connection.</li>      
  +</ol>
  +
  +<anchor name="sql-ext-features"/>
  +<s3 title="SQL Extension Feature Settings">
  +<p>The SQL Extension allows features of the extension to be set through the setFeature / getFeature interface.</p>
  +<p>To set a feature, use: <br/>
  +    <code>
  +      <![CDATA[<xsl:value-of select="]]><br/>
  +      <![CDATA[sql:setFeature($db, 'feature-name', 'feature-value')"/>]]>
  +    </code><br/><br/>
  +    To retrive the current value of the feature, use: <br/>
  +     <code>
  +      <![CDATA[<xsl:value-of select="]]><br/>
  +      <![CDATA[sql:getFeature($db, 'feature-name')"/>]]>
  +      </code><br/> 
  +    </p>
  +    <table>
  +     <tr>
  +      <th>Feature</th>
  +      <th>Valid Values</th>
  +      </tr>
  +      <tr>
  +       <td>streaming</td>
  +       <td>true or false</td>
  +      </tr>
  +    </table>
  +</s3>
  +   
  +<p>The query() and pquery() extension functions return a Document node that contains (as needed)       
  +an array of column-header elements, a single row element that is used repeatedly, and an array 
  +of col elements. Each column-header element (one per column in the row-set) contains an attribute 
  +(ColumnAttribute) for each of the column descriptors in the ResultSetMetaData object.  Each col 
  +element contains a text node with a textual representation of the value for that column in the 
  +current row.</p>
  +
  +<anchor name="sqlconn"/>
  +<s3 title="Setting up a connection">
  +<p>You can place connection information (JDBC driver, datasource URL, and usually user ID 
  +and password) in stylesheets or in XML source documents.</p> 
  +<p>The following stylesheet fragment uses stylesheet parameters to designate a JDBC driver 
  +and datasource. The default parameter values can be overridden with runtime parameter values.</p>
  +<source>
  +      <p>&lt;xsl:param name=&quot;driver&quot; select=&quot;'org.apache.derby.jdbc.EmbeddedDriver'&quot;/&gt;</p>
  +      <p>&lt;xsl:param name=&quot;datasource&quot; select=&quot;'jdbc:derby:sampleDB'&quot;/&gt;</p>
  +      <p>&lt;xsl:param name=&quot;query&quot; select=&quot;'SELECT * FROM import1'&quot;/&gt;<br /></p>
  +</source>
  +<p>You can also obtain connection information from the XML source document that you use for the 
  +transformation. Suppose you have the following DBINFO nodeset in an XML document:</p>
  +<source>
  +      <p>&lt;DBINFO&gt;</p>
  +      <p>&lt;dbdriver&gt;org.apache.derby.jdbc.EmbeddedDriver&lt;/dbdriver&gt; </p>
  +      <p>&lt;dburl&gt;jdbc:derby:sampleDB&lt;/dburl&gt; </p>
  +      <p>&lt;user&gt;jbloe&lt;/user&gt; </p>
  +      <p>&lt;password&gt;geron07moe&lt;/password&gt; </p>
  +      <p>&lt;/DBINFO&gt;</p>
  +</source>
  +<p>In the stylesheet, you can extract this information as follows:</p>
  +<source>
  +     &lt;xsl:stylesheet version 1.0
  +      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  +      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlns:sql="http://xml.apache.org/xalan/sql"
  +      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extension-element-prefixes="sql"&gt;
  +      &nbsp;&nbsp;&lt;xsl:param name="cinfo" select="//DBINFO"/&gt;
  +      &nbsp;&nbsp;&lt;xsl:variable name="db" select="sql:new($cinfo)"/&gt;
  +      ....
  +</source> 
  +<p>For an example of both approaches, see <link idref="samples" anchor="basic-conn">Basic Connection</link> 
  +samples.</p>
  +<p>You can also create a named connection pool that is maintained external to &xslt4j;.</p>
  +<source>
  +        import org.apache.xalan.lib.sql.DefaultConnectionPool;
  +        import org.apache.xalan.lib.sql.XConnectionPoolManager;
  +        ...
  +        DefaultConnectionPool cp = new DefaultConnectionPool();
  +        cp.setDriver("org.apache.derby.jdbc.EmbeddedDriver");
  +        cp.setURL("jdbc:derby:sampleDB");
  +        cp.setUser("");
  +        cp.setPassword("");
  +        // Start with 10 connections.
  +        cp.setMinConnections(10);
  +        cp.enablePool();
  +        // Register the connection pool so stylesheets can use it.
  +        XConnectionPoolManager pm = new XConnectionPoolManager();
  +        pm.registerPool("extpool", cp);
  +</source>
  +<p>A stylesheet can use this connection pool as follows:</p>
  +<source>
  +       &lt;xsl:stylesheet version 1.0
  +       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  +       xmlns:sql="http://xml.apache.org/xalan/sql"
  +       extension-element-prefixes="sql"&gt;
  +       ...
  +        &lt;xsl:variable name="db" select="sql:new($driver, 'extpool')"/&gt;
  +</source>
  +<p>For an example, see the <link idref="samples" anchor="ext-conn">ExternalConnection</link> 
  +sample.</p>
  +</s3>
  +
  +<anchor name="sqlparam"/>
  +<s3 title="Parameterized queries">
  +<p>To define a parameterized query, use a SQL query string with a question mark (?) for each 
  +parameter. You can provide the parameter values at runtime with stylesheet parameters or with 
  +nodes in the XML source document. 
  +For each parameter, you should also designate the SQL data type.</p>
  +<p>XConnection provides a number of addParameter() methods and an addParameterFromElement() method 
  +that you can use as extension functions to pull in the parameter values (in the order the 
  +parameters appear in the query). To execute the query and return the result set, call the pquery() 
  +method as an extension function. There are two variations of the pquery() method. The one you 
  +should ordinarily use includes as arguments the SQL query string and a string list 
  +(delimited by the space, tab, or line feeds) of parameter types. For example:</p>
  +<source>
  +        &lt;xsl:variable name="resultset" 
           select=sql:pquery($XConnectionObj, 
                             'select * from X where Y = ? and Z = ?',
  -                          'int string')"/&gt;</source>
  -      <p>For a complete example, see the <link idref="samples" anchor="pquery">Parameterized query</link> sample.</p>
  -  </s3><anchor name="ex-sql"/> 
  -    <s3 title="Example with SQL library">
  -    <p>This example displays the result set from a table in a sample InstantDB database. It is also
  -    available as a sample application; see <link idref="samples" anchor="ext6">6-sqllib-instantdb</link>.</p>
  -<source>&lt;?xml version="1.0"?&gt;
  -&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  -                version="1.0"
  -                xmlns:sql="http://xml.apache.org/xalan/sql"
  -                extension-element-prefixes="sql"&gt;
  -  &lt;xsl:output method="html" indent="yes"/&gt;
  -  &lt;xsl:param name="query" select="'SELECT * FROM import1'"/&gt;
  - 
  -  &lt;xsl:template match="/"&gt;
  -    &lt;!-- 1. Make the connection --&gt;
  -    &lt;xsl:variable name="products"
  -                  select="sql:new('org.enhydra.instantdb.jdbc.idbDriver',
  -                                'jdbc:idb:.\instantdb\sample.prp')"/&gt;
  -    &lt;HTML&gt;
  +                          'int string')"/&gt;
  +</source>
  +<p>
  +For a complete example, see the <link idref="samples" anchor="pquery">Parameterized query</link> sample.
  +</p>
  +</s3>
  +
  +<anchor name="ex-sql"/> 
  +<s3 title="Example with SQL library">
  +<p>This example displays the result set from a table in a sample Derby database. It is also
  +available as a sample application; see <link idref="samples" anchor="sql">SQl Extension Samples</link>.</p>
  +<source>
  +      &lt;?xml version="1.0"?&gt;
  +      &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  +          version="1.0"
  +          xmlns:sql="http://xml.apache.org/xalan/sql"
  +          extension-element-prefixes="sql"&gt;
  +      &lt;xsl:output method="html" indent="yes"/&gt;
  +      &lt;xsl:param name="query" select="'SELECT * FROM import1'"/&gt;
  +      &lt;xsl:template match="/"&gt;
  +      &lt;!-- 1. Make the connection --&gt;
  +      &lt;xsl:variable name="products"
  +              select="sql:new('org.apache.derby.jdbc.EmbeddedDriver',
  +             'jdbc:derby:sampleDB')"/&gt;
  +      &lt;HTML&gt;
         &lt;HEAD&gt;
         &lt;/HEAD&gt;
         &lt;BODY&gt;
  @@ -440,30 +500,31 @@
   &lt;/xsl:stylesheet&gt;
   </source>
   </s3>
  -  
  -  </s2><anchor name="pipedocument"/>
  -  <s2 title="pipeDocument">
  -  <p>Implemented in <jump href="apidocs/org/apache/xalan/lib/PipeDocument.html">
  -  org.apache.xalan.lib.PipeDocument</jump>,<br/>
  -  the pipeDocument extension element pipes an XML document through a series of one or more 
  -  transformations. The output of each transformation is piped to the next transformation. The 
  -  final transformation creates a target file.</p>
  -  <p>The namespace for the pipeDocument extension is:</p>
  -  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>http://xml.apache.org/xalan/PipeDocument</code></p>
  -
  -  <p>Suppose, for example,you have a stylesheet that is processing a "book" document with elements 
  -  designating the documents to be transformed. This primary stylesheet generates a table of 
  -  contents for the book. For each source document it uses a pipeDocument extension element to pipe 
  -  the document through a series of one or more transformations.</p>
  -  <s3 title="Sample: generating a table of contents and an HTML &quot;book&quot;">
  -    <p>An XML "book" document contains a number of doc elements like the following:<br/>
  -    <code>&lt;doc source="sources/intro.xml" id="intro" label="Introduction"&gt;</code></p>
  -    <p>The source attribute identifies the document to be transformed, the id is the output file name, 
  -    and the primary stylesheet places the label in the table-of-contents link.</p>
  -    <p>The stylesheet declares the pipeDocument namespace, designates the namespace prefix as an 
  -    extension element prefix, and contains a parameter designating where the output files are to 
  -    be placed:</p>
  -  <source>&lt;xsl:stylesheet version="1.0"
  +</s2>
  +
  +<anchor name="pipedocument"/>
  +<s2 title="pipeDocument">
  +<p>Implemented in <jump href="apidocs/org/apache/xalan/lib/PipeDocument.html">
  +org.apache.xalan.lib.PipeDocument</jump>,<br/>
  +the pipeDocument extension element pipes an XML document through a series of one or more 
  +transformations. The output of each transformation is piped to the next transformation. The 
  +final transformation creates a target file.</p>
  +<p>The namespace for the pipeDocument extension is:</p>
  +<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>http://xml.apache.org/xalan/PipeDocument</code></p>
  +<p>Suppose, for example,you have a stylesheet that is processing a "book" document with elements 
  +designating the documents to be transformed. This primary stylesheet generates a table of 
  +contents for the book. For each source document it uses a pipeDocument extension element to pipe 
  +the document through a series of one or more transformations.</p>
  +
  +<s3 title="Sample: generating a table of contents and an HTML &quot;book&quot;">
  +<p>An XML "book" document contains a number of doc elements like the following:<br/>
  +<code>&lt;doc source="sources/intro.xml" id="intro" label="Introduction"&gt;</code></p>
  +<p>The source attribute identifies the document to be transformed, the id is the output file name, 
  +and the primary stylesheet places the label in the table-of-contents link.</p>
  +<p>The stylesheet declares the pipeDocument namespace, designates the namespace prefix as an 
  +extension element prefix, and contains a parameter designating where the output files are to 
  +be placed:</p>
  +<source>&lt;xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:pipe="http://xml.apache.org/xalan/PipeDocument"
      extension-element-prefixes="pipe"&gt;
  @@ -490,14 +551,15 @@
     
   &lt;/xsl:template&gt;</source>
    
  -   <p>Notes:</p>
  -   <ul>
  -   <li>The base URI for the source attribute is the XML "book" document.</li>
  -   <li>The target attribute is taken as is (the base is the current user directory from which this 
  -       transformation is being run).</li>
  -   <li>The stylsheet containg the extension element is the base URI for the stylesheet hrefs.</li>
  -   </ul>
  +<p>Notes:</p>
  + <ul>
  + <li>The base URI for the source attribute is the XML "book" document.</li>
  + <li>The target attribute is taken as is (the base is the current user directory from which this 
  +     transformation is being run).</li>
  + <li>The stylsheet containg the extension element is the base URI for the stylesheet hrefs.</li>
  + </ul>
   </s3>
  +
   <s3 title="Variation: using pipeDocument in an empty stylesheet">
   <p>Suppose you want to pipe a document through a series of transformations. You can use the pipeDocument 
   extension element to perform this operation by placing the extension element in an otherwise empty 
  @@ -534,17 +596,21 @@
   &lt;/xsl:stylesheet&gt;</source>
   
   </s3>  
  -  </s2><anchor name="evaluate"/>
  -  <s2 title= "evaluate">
  -  <p>Implemented in <jump href="apidocs/org/apache/xalan/lib/Extensions.html">
  -  org.apache.xalan.lib.Extensions</jump>,<br/>
  +</s2>
  +
  +<anchor name="evaluate"/>
  +<s2 title= "evaluate">
  +<p>Implemented in <jump href="apidocs/org/apache/xalan/lib/Extensions.html">
  +org.apache.xalan.lib.Extensions</jump>,<br/>
   <code>evaluate (xpath-expression)</code> function returns the result of evaluating the xpath-expression 
   in the current XPath expression context (automatically passed in by the extension mechanism).</p>
   <p>Use the evaluation extension function when the value of the expression is not known until run time.</p>
   <note>Although you can still use the evaluate extension function in the main Extensions class, the 
   preferred solution is to use the same function in the EXSLT dynamic package. This will make your 
   stylesheet more portable across XSLT processors that support EXSLT extensions.</note>
  -</s2><anchor name="tokenize"/>
  +</s2>
  +
  +<anchor name="tokenize"/>
   <s2 title="tokenize">
   <p>Implemented in <jump href="apidocs/org/apache/xalan/lib/Extensions.html">
   org.apache.xalan.lib.Extensions</jump>,<br/> 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org