cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/docs book.xml cocoon2.xml dcpprocessor.xml dynamic.xml faq.xml guide.xml index.xml installing.xml javadoc.xml license.xml sqlprocessor.xml technologies.xml WD-xsp.xml
Date Fri, 03 Dec 1999 00:08:42 GMT
stefano     99/12/02 16:08:42

  Modified:    docs     cocoon2.xml dcpprocessor.xml dynamic.xml faq.xml
                        guide.xml index.xml installing.xml javadoc.xml
                        license.xml sqlprocessor.xml technologies.xml
                        WD-xsp.xml
  Added:       docs     book.xml
  Log:
  we are now able to build the xml.apache.org/cocoon web site
  
  also a bunch of fixes to the documents to make them appear nice on the web site
  
  Revision  Changes    Path
  1.3       +24 -19    xml-cocoon/docs/cocoon2.xml
  
  Index: cocoon2.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/cocoon2.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cocoon2.xml	1999/11/30 16:29:51	1.2
  +++ cocoon2.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  @@ -61,9 +61,10 @@
     formatted in the response stream. This has significant impacts on performance
     and memory needs:</p>
     
  -  <ul>
  -    <li>
  -      <strong>incremental operation</strong>: the response is created
  +  <dl>
  +    <dt>incremental operation</dt>
  +    <dd>
  +      the response is created
         during document production. Client's perceived performance is dramatically
         improved since clients can start receiving data as soon as it is created,
         not after all processing stages have been performed. In those cases where
  @@ -71,29 +72,33 @@
         internal buffers store the events until the operation can be performed.
         However, even in these cases performance can be increased with the use of
         tuned memory structures.
  -    </li>
  -    <li>
  -      <strong>lowered memory consumption</strong>: since most of the
  +    </dd>
  +    <dt>lowered memory consumption</dt>
  +    <dd>
  +      since most of the
         server processing required in Cocoon is incremental, an incremental model
         allows XML production events to be transformed directly into output events
         and character written on streams, thus avoiding the need to store them in
         memory.
  -    </li>
  -    <li>
  -      <strong>easier scalability</strong>: reduce memory needs allow more
  +    </dd>
  +    <dt>easier scalability</dt>
  +    <dd>
  +      reduce memory needs allow more
         concurrent operation to be possible, thus allowing the publishing system
         to scale as the load increases.
  -    </li>
  -    <li>
  -      <strong>more optimizable code model</strong>: modern virtual
  +    </dd>
  +    <dt>more optimizable code model</dt>
  +    <dd>
  +      modern virtual
         machines are based on the idea of <em>hot spots</em>, code fragments that
         are used often and, if optimized, increase the process execution by far.
         This new event model allows easier detection of hot spots since it's a
         method driven operation, rather than a memory driven one. Hot methods can
         be identified earlier and their optimization performed better.
  -    </li>
  -    <li>
  -      <strong>reduced garbage collection</strong>: even the most advanced
  +    </dd>
  +    <dt>reduced garbage collection</dt>
  +    <dd> 
  +      even the most advanced
         and lightweight DOM implementation require at least three to five times
         (and sometimes much more than this) more memory than original document
         size. This does not only reduce the scalability of the operation, but also
  @@ -101,8 +106,8 @@
         must be collected after the response in sent to the client. Even if modern
         virtual machines reduced the overhead of garbage collection, less garbage
         will always have performance and scalability impacts.
  -    </li>
  -  </ul>
  +    </dd>
  +  </dl>
     
     <p>The above points, alone, would be enough for the Cocoon2
     paradigm shift, even if this event based model impacts not only the general
  
  
  
  1.3       +2 -2      xml-cocoon/docs/dcpprocessor.xml
  
  Index: dcpprocessor.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/dcpprocessor.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- dcpprocessor.xml	1999/11/30 16:29:51	1.2
  +++ dcpprocessor.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  
  
  
  1.3       +56 -42    xml-cocoon/docs/dynamic.xml
  
  Index: dynamic.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/dynamic.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- dynamic.xml	1999/11/30 16:29:51	1.2
  +++ dynamic.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  @@ -88,11 +88,14 @@
     
     <p>The Cocoon processing model is based on the separation of</p>
     
  -  <ul>
  -    <li><strong>Production</strong>where XML content is generated based on Request parameters (servlet equivalent)</li>
  -    <li><strong>Processing</strong>where the produced XML content is transformed/evaluated</li>
  -    <li><strong>Formatting</strong>where the XML content is finally formatted into the wanted output format for client use.</li>
  -  </ul>
  +  <dl>
  +    <dt>Production</dt>
  +    <dd>where XML content is generated based on Request parameters (servlet equivalent)</dd>
  +    <dt>Processing</dt>
  +    <dd>where the produced XML content is transformed/evaluated</dd>
  +    <dt>Formatting</dt>
  +    <dd>where the XML content is finally formatted into the wanted output format for client use.</dd>
  +  </dl>
     
     <p>This separation of working contexts allows Cocoon users to
     implement their own internal modules to add the functionality they require to
  @@ -112,30 +115,35 @@
     <p>Here follows the code for an example producer distributed with
     Cocoon:</p>
     
  -<source>
  -public class DummyProducer extends AbstractProducer implements Status {
  +<source><![CDATA[
  +public class DummyProducer 
  +  extends AbstractProducer 
  +  implements Status 
  +{
             
  -  String dummy = "&lt;?xml version=\"1.0\"?&gt;" 
  -      + "&lt;?cocoon:format type=\"text/html\"?&gt;"
  -      + "&lt;html&gt;&lt;body&gt;"
  -      + "&lt;h1 align=\"center\"&gt;"
  +  String dummy = "<?xml version=\"1.0\"?>" 
  +      + "<?cocoon:format type=\"text/html\"?>"
  +      + "<html><body>"
  +      + "<h1 align=\"center\">"
             + "Hello from a dummy page"
  -      + "&lt;/h1&gt;"
  -      + "&lt;/body&gt;&lt;/html&gt;";
  +      + "</h1>"
  +      + "</body></html>";
         
  -  public Reader getStream(HttpServletRequest request) throws IOException {
  -      return new StringReader(dummy);
  +  public Reader getStream(HttpServletRequest request) 
  +    throws IOException 
  +  {
  +    return new StringReader(dummy);
     }
   
     public String getPath(HttpServletRequest request) {
  -      return "";
  +    return "";
     }
     
     public String getStatus() {
  -      return "Dummy Producer";
  +    return "Dummy Producer";
     }
   }
  -</source>
  +]]></source>
   
     <p>The key method is <code>getStream()</code> which is responsible to create
     process the given servlet request and provide an output stream for reading the
  @@ -162,22 +170,22 @@
     it may have been produced from a file, from other sources or dynamically, see
     the above paragraph):</p>
     
  -<source>
  -&lt;?xml version="1.0"?&gt;
  -&lt;page&gt;
  - &lt;p&gt;Current time is &lt;time/&gt;&lt;/p&gt;
  -&lt;/page&gt;
  -</source>
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<page>
  + <p>Current time is <time/></p>
  +</page>
  +]]></source>
     
     <p>Our simple example processor will look for the %lg;time/%gt; tags and will 
     expand them to the current local time, creating this result document:</p>
     
  -<source>
  -&lt;?xml version="1.0"?&gt;
  -&lt;page&gt;
  - &lt;p&gt;Current time is 6:48PM&lt;/p&gt;
  -&lt;/page&gt;
  -</source>
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<page>
  + <p>Current time is 6:48PM</p>
  +</page>
  +]]></source>
               
     <p>Please, look at the shipped processors source code for example
     code and look at the <connect href="guide.xml">user guide</connect> on how to install and
  @@ -190,24 +198,30 @@
     includes a number of processors that implement common needs and situations.
     These are:</p>
     
  -  <ul>
  -    <li><strong>The XSLT processor</strong>
  +  <dl>
  +    <dt>The XSLT processor</dt>
  +    <dd>
         the <em>XSLT</em> processor that applies XSLT
         transformations to the input document. XSLT allows you to solve your
         transformation needs as well as simple tag evaluation/processing due to
  -      its extensible and programmable nature.</li>
  -    <li><strong>The DCP processor</strong>
  +      its extensible and programmable nature.
  +    </dd>
  +    <dt>The DCP processor</dt>
  +    <dd>
         the <em>DCP</em> processor that evaluates XML processing
         instructions with multi-language (Java and EcmaScript) logic. This
         processor allows you to do programmatic substitution and inclusion
         eliminating the need for complex processing logic. See the <connect href="dcpprocessor.xml">DCP
  -      user guide</connect> for more information.</li>
  -    <li><strong>The SQL processor</strong>
  +      user guide</connect> for more information.
  +    </dd>
  +    <dt>The SQL processor</dt>
  +    <dd>
         the <em>SQL</em> processor that evaluates simple tags
         describing SQL queries to JDBC drivers and formats their result-set in XML
  -      depending on given parameters. See the <connect href="sqlprocessor.html">SQL
  -      processor user guide</connect> for more information.</li>
  -  </ul>
  +      depending on given parameters. See the <connect href="sqlprocessor.xml">SQL
  +      processor user guide</connect> for more information.
  +    </dd>
  +  </dl>
   </s1>
   
   <s1 title="Future plans">
  @@ -218,7 +232,7 @@
     separation between content and logic in dynamically generated XML pages is not
     achieved with current Cocoon features.</p>
     
  -  <p>To fill this whole, the <connect href="xsp/WD-xsp.xml">XSP
  +  <p>To fill this whole, the <connect href="WD-xsp.xml">XSP
     (eXtensible Server Pages) technology</connect> was proposed. While in the <em>working
     draft</em> stage, we strongly believe that some of the issues expressed in that
     specification will be keys to the future of dynamic XML.</p>
  
  
  
  1.3       +3 -3      xml-cocoon/docs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/faq.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- faq.xml	1999/11/30 16:29:51	1.2
  +++ faq.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE faqs SYSTEM "../dtd/faq-v10.dtd">
  +<!-- <!DOCTYPE faqs SYSTEM "../dtd/faq-v10.dtd"> -->
   
   <faqs title="Cocoon Frequently Asked Questions">
   
  @@ -26,7 +26,7 @@
   </faq>
   
   <faq>
  - <question>"Where do I get more information on XSL and XML?"</question>
  + <question>Where do I get more information on XSL and XML?</question>
    <answer>
     <p>
       The web community is very exited about XML and XSL and many sources of
  
  
  
  1.3       +157 -121  xml-cocoon/docs/guide.xml
  
  Index: guide.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/guide.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- guide.xml	1999/11/30 16:29:51	1.2
  +++ guide.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  @@ -36,10 +36,12 @@
     <p>This comment posted on the Cocoon mail list shows you what we mean:</p>
     
   <source>
  -I've got a site up and running that uses Cocoon. It rocks, the management 
  -loves me (they now treat me like I walk on water), and a couple of summer 
  -interns that I had helping me on the project are suddenly getting massively 
  -head-hunted by companies like AT&amp;T now that they can put XML and XSL on 
  +I've got a site up and running that uses Cocoon. 
  +It rocks, the management loves me (they now treat 
  +me like I walk on water), and a couple of summer 
  +interns that I had helping me on the project are 
  +suddenly getting massively head-hunted by companies 
  +like AT&amp;T now that they can put XML and XSL on 
   their resumes.  In a word: Cocoon simply rocks!
   </source>
   </s1>
  @@ -49,15 +51,15 @@
     write good documentation (even if its hard like hell!), we start from there
     too. Here is a well-formed XML file that uses a custom and simple DTD</p>
     
  -<source>
  -&lt;?xml version="1.0"?&gt;
  -&lt;page&gt;
  - &lt;title&gt;Hello World!&lt;/title&gt;
  - &lt;content&gt;
  -  &lt;paragraph&gt;This is my first Cocoon page!&lt;/paragraph&gt;
  - &lt;/content&gt;
  -&lt;/page&gt;
  -</source>
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<page>
  + <title>Hello World!</title>
  + <content>
  +  <paragraph>This is my first Cocoon page!</paragraph>
  + </content>
  +</page>
  +]]></source>
     
     <p>Even if this page mimics HTML (in a sense, HTML was born as a simple DTD
     for homepages), it is helpful to note that there is no style information
  @@ -86,11 +88,11 @@
     and define its own namespace accordingly to the W3C directions. So the
     skeleton of your stylesheet is:</p>
     
  -<source>
  -&lt;?xml version="1.0"?&gt;
  -&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"&gt;
  -&lt;/xsl:stylesheet&gt;
  -</source>
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  +</xsl:stylesheet>
  +]]></source>
   
     <p>Once the skeleton is done, you must include your <code>template</code> elements,
     which are the basic unit of operation for the XSLT language. Each template is
  @@ -103,18 +105,18 @@
     root element. This must be transformed in all those tags that identify a good
     HTML page. Your template becomes:</p>
     
  -<source>
  -&lt;xsl:template match="page"&gt;
  - &lt;html&gt;
  -  &lt;head&gt;
  -   &lt;title&gt;&lt;xsl:value-of select="title"/&gt;&lt;/title&gt;
  -  &lt;/head&gt;
  -  &lt;body bgcolor="#ffffff"&gt;
  -   &lt;xsl:apply-templates/&gt;
  -  &lt;/body&gt;
  - &lt;/html&gt;
  -&lt;/xsl:template&gt;
  -</source>
  +<source><![CDATA[
  +<xsl:template match="page">
  + <html>
  +  <head>
  +   <title><xsl:value-of select="title"/></title>
  +  </head>
  +  <body bgcolor="#ffffff">
  +   <xsl:apply-templates/>
  +  </body>
  + </html>
  +</xsl:template>
  +]]></source>
                
     <p>were some elements belong to the standard namespace (which we associate to
     HTML) and some others to the <em>xsl:</em> namespace. Here we find two of those
  @@ -127,35 +129,35 @@
     
     <p>Other possible templates are:</p>
     
  -<source>
  -&lt;xsl:template match="title"&gt;
  - &lt;h1 align="center"&gt;
  -  &lt;xsl:apply-templates/&gt;
  - &lt;/h1&gt;
  -&lt;/xsl:template&gt;
  -
  -&lt;xsl:template match="paragraph"&gt;
  - &lt;p align="center"&gt;
  -  &lt;i&gt;&lt;xsl:apply-templates/&gt;&lt;/i&gt;
  - &lt;/p&gt;
  -&lt;/xsl:template&gt; 
  -</source> 
  +<source><![CDATA[
  +<xsl:template match="title">
  + <h1 align="center">
  +  <xsl:apply-templates/>
  + </h1>
  +</xsl:template>
  +
  +<xsl:template match="paragraph">
  + <p align="center">
  +  <i><xsl:apply-templates/></i>
  + </p>
  +</xsl:template> 
  +]]></source> 
   
     <p>After the XSLT processing, the original document is transformed to</p>
   
  -<source>
  -&lt;html&gt;
  - &lt;head&gt;
  -  &lt;title&gt;Hello&lt;/title&gt;
  - &lt;/head&gt;
  - &lt;body bgcolor="#ffffff"&gt;
  -  &lt;h1 align="center"&gt;Hello&lt;/h1&gt;
  -  &lt;p align="center"&gt;
  -   &lt;i&gt;This is my first Cocoon page!&lt;/i&gt;
  -  &lt;/p&gt;
  - &lt;/body&gt;
  -&lt;/html&gt;
  -</source>
  +<source><![CDATA[
  +<html>
  + <head>
  +  <title>Hello</title>
  + </head>
  + <body bgcolor="#ffffff">
  +  <h1 align="center">Hello</h1>
  +  <p align="center">
  +   <i>This is my first Cocoon page!</i>
  +  </p>
  + </body>
  +</html>
  +]]></source>
   
   </s1>
   
  @@ -172,14 +174,14 @@
     be applied. This is done by indicating in the stylesheet linking PI the <em>media</em>
     type, for example, continuing with the HelloWorld.xml document, these PIs</p>
     
  -<source>
  -&lt;?xml version="1.0"?&gt;
  -&lt;?xml-stylesheet href="hello.xsl" type="text/xsl"?&gt;
  -&lt;?xml-stylesheet href="hello.text.xsl" type="text/xsl" media="lynx"?&gt;
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<?xml-stylesheet href="hello.xsl" type="text/xsl"?>
  +<?xml-stylesheet href="hello-text.xsl" type="text/xsl" media="lynx"?>
   
   ...
   
  -</source>
  +]]></source>
   
     <p>would tell Cocoon to apply the <code>hello.text.xsl</code> stylesheet if the Lynx browser
     is requesting the page. This powerful feature allows you to design your content
  @@ -190,16 +192,26 @@
     based on their <code>User-Agent</code> http header information.
     Cocoon is preconfigured to handle these browsers:</p>
     
  -  <ul>
  -    <li><strong>explorer</strong> any Microsoft Internet Explorer, searches for <em>MSIE</em> (before
  -      searching for Mozilla, since they include it too)</li>
  -    <li><strong>opera</strong> the Opera browser (before searching for Mozilla, since
  -      they include it too)</li>
  -    <li><strong>lynx</strong> the text-only Lynx browser</li>
  -    <li><strong>java</strong> any Java code using standard URL classes</li>
  -    <li><strong>wap</strong> the Nokia WAP Toolkit browser</li>
  -    <li><strong>netscape</strong> any Netscape Navigator, searches for <em>Mozilla</em></li>
  -  </ul>
  +  <dl>
  +    <dt>explorer</dt>
  +    <dd>
  +      any Microsoft Internet Explorer, searches for <em>MSIE</em> (before
  +      searching for Mozilla, since they include it too)
  +    </dd>
  +    <dt>opera</dt>
  +    <dd>
  +      the Opera browser (before searching for Mozilla, since
  +      they include it too)
  +    </dd>
  +    <dt>lynx</dt>
  +    <dd>the text-only Lynx browser</dd>
  +    <dt>java</dt>
  +    <dd>any Java code using standard URL classes</dd>
  +    <dt>wap</dt>
  +    <dd>the Nokia WAP Toolkit browser</dd>
  +    <dt>netscape</dt>
  +    <dd>any Netscape Navigator, searches for <em>Mozilla</em></dd>
  +  </dl>
     
     <p>but you can add your own by personalizing the <code>cocoon.properties</code> file
     modify the <code>browser</code> properties. For example</p>
  @@ -209,7 +221,7 @@
   browser.1=opera=Opera
   browser.2=lynx=Lynx
   browser.3=java=Java
  -browser.4=wap=Wapsody
  +browser.4=wap=Nokia-WAP-Toolkit
   browser.5=netscape=Mozilla
   </source>
       
  @@ -228,32 +240,49 @@
     
     <p>Let's describe the components that appear on the schema:</p>
     
  -  <ul>
  -   <li><strong>Request</strong> wraps around the client's request and
  +  <dl>
  +   <dt>Request</dt>
  +   <dd>
  +     wraps around the client's request and
        contains all the information needed by the processing engine. The request
        must indicate what client generated the request, what URI is being
  -     requested and what producer should handle the request.</li>
  -   <li><strong>Producer</strong> handles the requested URI and produces an
  +     requested and what producer should handle the request.
  +   </dd>
  +   <dt>Producer</dt>
  +   <dd>
  +     handles the requested URI and produces an
        XML document. Since producers are pluggable, they work like subservlets
        for this framework, allowing users to define and implement their own
        producers. A producer is responsible of creating the XML document which is
        fed into the processing reactor. It's up to the producer implementation to
  -     define the function that produces the document from the request object.</li>
  -   <li><strong>Reactor</strong> is responsible of evaluating what
  +     define the function that produces the document from the request object.
  +   </dd>
  +   <dt>Reactor</dt>
  +   <dd>
  +     is responsible of evaluating what
        processor should work on the document by reacting on XML processing
        instructions. The reactor pattern is different from a processing pipeline
        since it allows the processing path to the dynamically configurable and it
        increases performance since only those required processors are called to
        handle the document. The reactor is also responsible to forward the
  -     document to the appropriate formatter.</li>
  -   <li><strong>Formatter</strong> transforms the memory representation of
  +     document to the appropriate formatter.
  +   </dd>
  +   <dt>Formatter</dt>
  +   <dd>
  +     transforms the memory representation of
        the XML document into a stream that may be interpreted by the requesting
        client. Depending on other processing instructions, the document leaves
        the reactor and gets formatted for its consumer. The output MIME type of
  -     the generated document depends on the formatter implementation.</li>
  -   <li><strong>Response</strong>encapsulates the formatted document along
  -     with its properties (such as length, MIME type, etc..)</li>
  -   <li><strong>Loader</strong> is responsible of loading the formatted
  +     the generated document depends on the formatter implementation.
  +   </dd>
  +   <dt>Response</dt>
  +   <dd>
  +     encapsulates the formatted document along
  +     with its properties (such as length, MIME type, etc..)
  +   </dd>
  +   <dt>Loader</dt>
  +   <dd>
  +     is responsible of loading the formatted
        document when this is executable code. This part is used for compiled
        server pages where the separation of content and logic is merged and
        compiled into a Producer. When the formatter output is executable code, it
  @@ -261,9 +290,10 @@
        as a document producer. This guarantees both performance improvement
        (since the producer are cached) as well as easier producer development,
        following the common compiled server pages model. [this part is not yet
  -     implemented]</li>
  -   </ul>
  -  </s1>
  +     implemented]
  +   </dd>
  +  </dl>
  + </s1>
     
   <s1 title="Cocoon Processing Instructions">
     <p>The Cocoon reactor uses XML processing instructions to forward the document
  @@ -283,46 +313,52 @@
     document should be processed by the XSLT processor. To do this, the HelloWorld.xml
     document should be modified like this:</p>
     
  -<source>
  -&lt;?xml version="1.0"?&gt;
  -&lt;?cocoon-process type="xslt"?&gt;
  -&lt;?xml-stylesheet href="hello.xsl" type="text/xsl"?&gt;
  -&lt;page&gt;
  - &lt;title&gt;Hello World!&lt;/title&gt;
  - &lt;content&gt;
  -  &lt;paragraph&gt;This is my first Cocoon page!&lt;/paragraph&gt;
  - &lt;/content&gt;
  -&lt;/page&gt;
  -</source>  
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<?cocoon-process type="xslt"?>
  +<?xml-stylesheet href="hello.xsl" type="text/xsl"?>
  +<page>
  + <title>Hello World!</title>
  + <content>
  +  <paragraph>This is my first Cocoon page!</paragraph>
  + </content>
  +</page>
  +]]></source>  
     
     <p>The other processing instruction is used to indicate what formatter should
     be used to transform the document tree into a suitable form for the requesting
     client. For example, in the document below that uses the XSL formatting object
     DTD, the Cocoon PI indicates that this document should be formatted using the
     formatter associated to the <code>text/xslfo</code> document type.</p>
  -
  -<source>
  -&lt;?xml version="1.0"?&gt;
  -&lt;?cocoon-format type="text/xslfo"?&gt;
   
  -&lt;fo:root xmlns:fo="http://www.w3.org/XSL/Format/1.0"&gt;
  - &lt;fo:layout-master-set&gt;
  -  &lt;fo:simple-page-master page-master-name="one" margin-left="100pt" margin-right="100pt"&gt;
  -   &lt;fo:region-body margin-top="50pt" margin-bottom="50pt"/&gt;
  -  &lt;/fo:simple-page-master&gt;
  - &lt;/fo:layout-master-set&gt;
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<?cocoon-format type="text/xslfo"?>
  +
  +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  + <fo:layout-master-set>
  +  <fo:simple-page-master 
  +      page-master-name="one" 
  +      margin-left="100pt"
  +      margin-right="100pt">
  +   <fo:region-body margin-top="50pt" 
  +       margin-bottom="50pt"/>
  +  </fo:simple-page-master>
  + </fo:layout-master-set>
    
  - &lt;fo:page-sequence&gt;
  -  &lt;fo:sequence-specification&gt;
  -   &lt;fo:sequence-specifier-repeating page-master-first="one" page-master-repeating="one"/&gt;
  -  &lt;/fo:sequence-specification&gt;
  -  
  -  &lt;fo:flow font-size="14pt" line-height="14pt"&gt;
  -   &lt;fo:block&gt;Welcome to Cocoon&lt;/fo:block&gt;  
  -  &lt;/fo:flow&gt;  
  - &lt;/fo:page-sequence&gt; 
  -&lt;/fo:root&gt;
  -</source>  
  + <fo:page-sequence>
  +  <fo:sequence-specification>
  +   <fo:sequence-specifier-repeating 
  +       page-master-first="one" 
  +       page-master-repeating="one"/>
  +  </fo:sequence-specification>
  +  
  +  <fo:flow font-size="14pt" line-height="14pt">
  +   <fo:block>Welcome to Cocoon</fo:block>  
  +  </fo:flow>  
  + </fo:page-sequence> 
  +</fo:root>
  +]]></source>  
   
   </s1>
   
  
  
  
  1.3       +9 -8      xml-cocoon/docs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/index.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.xml	1999/11/30 16:29:51	1.2
  +++ index.xml	1999/12/03 00:08:41	1.3
  @@ -1,9 +1,7 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
  -<?xml-stylesheet href="./stylesheet/simple.document.html.xsl" type="text/xsl"?>
  -
   <document>
    <header>
     <title>Cocoon</title>
  @@ -14,7 +12,10 @@
    </header>
   
    <body>
  - <s1 title="What is it?">	
  + <s1 title="What is it?">
  +  
  +  <img-block src="images/cocoon.jpg" alt="Cocoon"/>
  +  
     <p>
      Cocoon is a 100% pure Java publishing framework that relies on new W3C
      technologies (such as DOM, XML, and XSL) to provide web content.
  @@ -30,8 +31,8 @@
     </p>
     
     <p>
  -   Read the <link href="technologies.html">Introduction on Cocoon
  -   technologies</link> white paper to find out more on the subject.
  +   Read the <connect href="technologies.xml">Introduction on Cocoon
  +   technologies</connect> white paper to find out more on the subject.
     </p>
    </s1>
    
  @@ -150,7 +151,7 @@
     </p>
     <p>
      For direct participation, we suggest you to subscribe to the 
  -   <link href="http://xml.apache.org/???">Cocoon mail list</link> 
  +   <link href="http://xml.apache.org/mail.html">Cocoon mail lists</link> 
      (follow the link for information on how to subscribe and to access the mail 
      list archives), to checkout the <link href="http://www.apache.com/cvsweb/index.cgi/cocoon/">
      latest and greatest code</link> (which you found in the xml-cocoon module in 
  
  
  
  1.3       +4 -3      xml-cocoon/docs/installing.xml
  
  Index: installing.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/installing.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- installing.xml	1999/11/30 16:29:51	1.2
  +++ installing.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="UTF-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  @@ -58,7 +58,8 @@
     <p>
      For this reason, in order to work out of the box and have complete operation, 
      you need to download all three packages (Xerces-J, Xalan-J and FOP) from the
  -   <link href="http://xml.apache.org/dist/">xml.apache.org</link>. Once you have
  +   <link href="http://xml.apache.org/dist/">xml.apache.org</link> distribution
  +   area. Once you have
      all three jar packages required and all other packages that may be required
      by these projects, go ahead and follow the instructions for your servlet
      engine.
  
  
  
  1.2       +22 -29    xml-cocoon/docs/javadoc.xml
  
  Index: javadoc.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/javadoc.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- javadoc.xml	1999/11/30 16:29:51	1.1
  +++ javadoc.xml	1999/12/03 00:08:41	1.2
  @@ -1,12 +1,13 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
     <title>Javadoc Documentation in XML</title>
     <authors>
      <person name="Kenneth Murphy" email="murphyk@umsystem.edu"/>
  +   <person name="Stefano Mazzocchi" email="stefano@apache.org"/>
     </authors>
    </header>
   
  @@ -48,13 +49,13 @@
     <ul>
       <li>javadoc.dtd ---&gt; javadoc_html.dtd ---&gt; HTML (this would create a
           javadoc that looks like the current HTML javadoc standard).</li>
  -    <li>javadoc.dtd ---&gt; docBook.dtd&nbsp; (this would facilitate printed
  +    <li>javadoc.dtd ---&gt; docBook.dtd (this would facilitate printed
           books based having heavy content about java API's. For example &quot;The
           JDBC API Tutorial and Reference: 2nd Edition&quot; could make heavy use
           of this.</li>
       <li>javadoc.dtd ---&gt; ebook.dtd (this would facilitate the electronic
           version of documentation)</li>
  -    <li>javadoc.dtd ---&gt; ??? ---&gt; pdf&nbsp;</li>
  +    <li>javadoc.dtd ---&gt; ??? ---&gt; pdf</li>
     </ul>
     <li>Using this method we will then enhance the existing Cocoon documentation to provide rich documentation
         using some subset of the above formats.</li>
  @@ -64,33 +65,25 @@
     </s1>
   
     <s1 title="Progress to date">
  -  <p><strong>Current Status:</strong> Phase 2</p>
  -  <p>Items currently under development:</p>
  -  <ul>
  -  <li>Phase 1</li>
  -  <ul>
  -   <li><connect href="../dtd/javadoc.dtd">javadoc.dtd</connect></li>
  -   <ul>
  -     <li>Note: I still need to update the sample to reflect the use of
  -         namespaces and the addition of the interfaceref element</li>
  -   </ul>
  -  </ul>
  -  <li>Phase 2</li>
  -  <ul>
  -    <li>Working on XML javadoc doclet</li>
  -  </ul>
  -  </ul>
  +   <p>
  +      The first phase has been complete and a complete javadoc DTD was
  +      created. We feel confortable with the solidity of that DTD and we plan
  +      to move over to the actual XML doclet implementation.
  +   </p>
  +   <p>
  +      The problem is that the original Javadoc XML proposal author quit the
  +      project for lack of time, so <strong>we are currently looking for people</strong>
  +      to move the task forward since we are almost stuck at this point.
  +   </p>
     </s1>
  -
  +  
     <s1 title="To do">
  -   <p>Currently, I am needing lots of feedback on the javadoc.dtd. We can't proceed
  -   to phase 2 until we feel we are on the right track with the DTD. It doesn't need
  -   to be perfect, but it should be close. When I get the next round of feedback, I
  -   am planning on adding &quot;import&quot; as an element of class. I am also
  -   planning on moving the position of the element &quot;doc&quot; to the start of
  -   each place it is appropriate. They will more closely reflect the source code and
  -   it just makes since to put the documentation before not after what you are
  -   talking about.</p>
  +   <p>
  +      Being the first phase complete (the DTD is still in working-draft phase,
  +      but it's complete and usable), we need to write the doclet, but the
  +      task is stalled for lack of active contributors. <strong>Any help is
  +      always welcome</strong>.
  +   </p>
     </s1>
   
    </body>
  
  
  
  1.3       +2 -2      xml-cocoon/docs/license.xml
  
  Index: license.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/license.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- license.xml	1999/11/30 16:29:51	1.2
  +++ license.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  
  
  
  1.3       +2 -2      xml-cocoon/docs/sqlprocessor.xml
  
  Index: sqlprocessor.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/sqlprocessor.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sqlprocessor.xml	1999/11/30 16:29:51	1.2
  +++ sqlprocessor.xml	1999/12/03 00:08:41	1.3
  @@ -1,6 +1,6 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  
  
  
  1.3       +71 -60    xml-cocoon/docs/technologies.xml
  
  Index: technologies.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/technologies.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- technologies.xml	1999/11/30 16:29:51	1.2
  +++ technologies.xml	1999/12/03 00:08:41	1.3
  @@ -1,10 +1,10 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE document SYSTEM "../dtd/document-v10.dtd">
  +<!-- <!DOCTYPE document SYSTEM "../dtd/document-v10.dtd"> -->
   
   <document>
    <header>
  - <title>Introduction on Cocoon Technologies</title>
  + <title>Technologies Used</title>
    <authors>
     <person name="Stefano Mazzocchi" email="stefano@apache.org"/>
     <person name="Keith Visco" email="visco@exoffice.com"/>
  @@ -24,7 +24,8 @@
   
   <s1 title="What is this XML?">
   
  -  <p>XML (<link href="http://www.w3.org/markup/">eXtended Markup Language</link>) is an SGML subset. SGML is the father of all
  +  <p>XML (<link href="http://www.w3.org/markup/">eXtended Markup Language</link>) 
  +  is an SGML subset. SGML is the father of all
     markup languages and its a 15-years old ISO standard for creating languages.
     XML is a lighter version of SGML.</p>
   
  @@ -52,8 +53,8 @@
   
   <p>So, any valid XML document is <em>well-formed</em> and an XML document <em>valid
   </em>for one particular DTD may not necessary be valid for another DTD.
  -For example, HTML is not an XML language because the <code>&lt;br&gt;&gt;</code> tag
  -is not XML compliant. XHTML (where <code>&lt;br&gt;&gt;</code> is replaced by <code>&lt;br/&gt;&gt;</code>)
  +For example, HTML is not an XML language because the <code>&lt;br&gt;</code> tag
  +is not XML compliant. XHTML (where <code>&lt;br&gt;</code> is replaced by <code>&lt;br/&gt;</code>)
   is XML compliant. While HTML pages are not always XML documents (some pages
   might be), XHTML pages are always well-formed and valid if matched against the
   XHTML DTD.</p>
  @@ -85,8 +86,8 @@
     An HTML page is not designed for this. It was designed for <em>how to present</em>
     the data.</p>
     <p>When I look at a web page I might see that an author choose to make every
  -  paragraph heading bold with <code>&lt;font size+1&gt;&gt;</code>. Yet if I look at
  -  another page I might notice that every paragraph heading was marked up with <code>&lt;H1&gt;&gt;</code>.
  +  paragraph heading bold with <code>&lt;font size+1&gt;</code>. Yet if I look at
  +  another page I might notice that every paragraph heading was marked up with <code>&lt;H1&gt;</code>.
     Yet another page may use tables and table headers to format the data. Find me
     every document that has the word <em>potato</em> in the paragraph heading
     of the first paragraph.</p>
  @@ -116,31 +117,32 @@
     weather information. And another link that says XML stream for weather
     information available. Yikes, would you look at that:</p>
     
  -  <source>
  -   &lt;weather-information&gt;
  -    &lt;location&gt;
  -     &lt;city&gt;Boston&lt;/city&gt;
  -     &lt;state&gt;MA&lt;/state&gt;
  -    &lt;/location&gt;
  -    &lt;summary&gt;
  +  <source><![CDATA[
  +   <weather-information>
  +    <location>
  +     <city>Boston</city>
  +     <state>MA</state>
  +    </location>
  +    <summary>
        Beautiful and Sunny, lows 50, highs 65, with the
        chance of a blizzard and gail force winds.
  -    &lt;/summary&gt;
  -   &lt;/weather-information&gt;
  -  </source>
  +    </summary>
  +   </weather-information>
  +  ]]></source>
             
     <p>So you download Cocoon, simply write an XSL stylesheet that looks the the following:</p>
     
  -  <source>
  -   &lt;xsl:stylesheet&gt;
  -    &lt;xsl:template match="/"&gt;
  +  <source><![CDATA[
  +   <xsl:stylesheet>
  +    <xsl:template match="/">
        ... presentation info here ...
  -    &lt;/xsl:template&gt;
  -    &lt;xsl:tempate match="weather-information[location/city = 'Boston']"&gt;
  -     &lt;xsl:apply-templates select="summary"/&gt;
  -    &lt;/xsl:template&gt;
  -   &lt;/xsl:stylesheet&gt;  
  -  </source>
  +    </xsl:template>
  +    <xsl:tempate 
  +      match="weather-information[location/city = 'Boston']">
  +     <xsl:apply-templates select="summary"/>
  +    </xsl:template>
  +   </xsl:stylesheet>  
  +  ]]></source>
     
     <p>And your boss gives you your job back! ;-)</p>
    </s1>
  @@ -157,33 +159,37 @@
   
   <p>In some HTML like this</p>
   
  -<source>
  -  &lt;html&gt;
  -   &lt;head&gt;
  -    &lt;title&gt;This is my article&lt;/title&gt;
  -   &lt;/head&gt;
  -   &lt;body&gt;
  -    &lt;h1 align="center"&gt;This is my article&lt;/h1&gt;
  -    &lt;h3 align="center&gt;by &lt;a href="mailto:stefano@apache.org"&gt;Stefano Mazzocchi&lt;/a&gt;&lt;/h3&gt;
  +<source><![CDATA[
  +  <html>
  +   <head>
  +    <title>This is my article</title>
  +   </head>
  +   <body>
  +    <h1 align="center">This is my article</h1>
  +    <h3 align="center>
  +     by <a href="mailto:stefano@apache.org">
  +         Stefano Mazzocchi
  +        </a>
  +    </h3>
       ...
  -   &lt;/body&gt;
  -  &lt;/html&gt; 
  -</source>
  +   </body>
  +  </html> 
  +]]></source>
   
   <p>you don't have a guaranteed way to extract the mail address, while in the
   following XML document</p>
   
  -<source>
  - &lt;?xml version="1.0"?&gt;
  -  &lt;page&gt;
  -   &lt;title&gt;This is my article&lt;/title&gt;
  -   &lt;author&gt;
  -    &lt;name&gt;Stefano Mazzocchi&lt;/name&gt;
  -    &lt;mail&gt;stefano@apache.org&lt;/mail&gt;
  -   &lt;/author&gt;
  +<source><![CDATA[
  + <?xml version="1.0"?>
  +  <page>
  +   <title>This is my article</title>
  +   <author>
  +    <name>Stefano Mazzocchi</name>
  +    <mail>stefano@apache.org</mail>
  +   </author>
      ...
  -  &lt;/page&gt;
  -</source> 
  +  </page>
  +]]></source> 
   
   <p>it's trivial and algorithmically certain.</p>
   
  @@ -231,7 +237,7 @@
   reason may be used in chain: transformA goes from DTD1 to DTD2 and transformB
   from DTD2 to DTD3 or graphically</p>
   
  -<source>DTD1 ---(transformA)--&gt;&gt; DTD2 ---(transformB)---&gt;&gt; DTD3</source>
  +<source>DTD1 ---(transformA)--&gt; DTD2 ---(transformB)---&gt; DTD3</source>
   
   <p>We'll call DTD1 the <em>original DTD</em> (because its the origin), DTD2 some <em>intermediate
   DTD</em>, DTD3 the <em>final DTD</em>. It can be shown that a transformation can
  @@ -251,16 +257,21 @@
   
   <p>The example above would lead:</p>
   
  -<source>
  - &lt;?xml version="1.0"?&gt;
  -  &lt;fo:root xmlns:fo="http://www.w3.org/XSL/Format/1.0"&gt;
  +<source><![CDATA[
  + <?xml version="1.0"?>
  +  <fo:root xmlns:fo="http://www.w3.org/XSL/Format/1.0">
       ...
  -    &lt;fo:flow font-size="14pt" line-height="14pt"&gt;
  -     &lt;fo:block text-align="centered" font-size="24pt" line-height="28pt"&gt;This is my article&lt;/fo:block&gt;
  -     &lt;fo:block space-before.optimum="12pt" text-align="centered"&gt;by Stefano Mazzocchi&lt;/fo:block&gt;
  -    &lt;/fo:flow&gt;
  -  &lt;/fo:root&gt;
  -</source> 
  +    <fo:flow font-size="14pt" line-height="14pt">
  +     <fo:block 
  +         text-align="centered" 
  +         font-size="24pt" 
  +         line-height="28pt">This is my article</fo:block>
  +     <fo:block 
  +         space-before.optimum="12pt" 
  +         text-align="centered">by Stefano Mazzocchi</fo:block>
  +    </fo:flow>
  +  </fo:root>
  +]]></source> 
   
     <p>which tells the formatting object formatter (the rendering engine), how to
     <em>draw</em> and place the text on the screen or on paper. Formatting
  @@ -280,8 +291,8 @@
     document tags from the programming logic that drive their server side
     behavior.</p>
   
  -  <p>The XSP language (<link href="xsp/WD-xsp.html">eXtensible Server Pages</link>) languages defines an XML DTD for
  -  separating content and logic for compiled server pages. 
  +  <p>The XSP language (<connect href="WD-xsp.xml">eXtensible Server Pages</connect>) 
  +  languages defines an XML DTD for separating content and logic for compiled server pages. 
     XSP (eXtensible Server Pages) is, like XSLFO, supposed to be a <em>final
     DTD</em> in the sense that is the result of one or more transformation steps
     and must be rendered by some formatter into pure source code that can then be
  
  
  
  1.3       +297 -265  xml-cocoon/docs/WD-xsp.xml
  
  Index: WD-xsp.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/docs/WD-xsp.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WD-xsp.xml	1999/12/02 11:52:54	1.2
  +++ WD-xsp.xml	1999/12/03 00:08:41	1.3
  @@ -1,10 +1,11 @@
  -<?xml version="1.0" encoding="utf-8"?>
  +<?xml version="1.0"?>
   
  -<!DOCTYPE spec SYSTEM "../dtd/specification-v10.dtd">
  +<!-- <!DOCTYPE spec SYSTEM "../dtd/specification-v10.dtd"> -->
   
   <spec>
    <header>
  -  <title>eXtensible Server Pages (XSP) Layer 1</title>
  +  <title>XSP Layer 1</title>
  +  <subtitle>eXtensible Server Pages</subtitle>
     <version>11091999</version>
     <type>Working Draft</type>
     <authors>
  @@ -131,12 +132,15 @@
   
   <s2 title="Relationship to Existing Standards">
     <p>Three standards have been especially influential:</p>
  -  <ul>
  -    <li><strong>JSP</strong> defines a way to embed programmatic logic into web documents.</li>
  -    <li><strong>XSLT</strong> defines a way to transform XML documents.</li>
  -    <li><strong>XML</strong> defines a flexible still highly structured paradigm for web
  -      content generation and distribution.</li>
  -  </ul>
  +  <dl>
  +    <dt>JSP</dt>
  +    <dd>defines a way to embed programmatic logic into web documents.</dd>
  +    <dt>XSLT</dt>
  +    <dd>defines a way to transform XML documents.</dd>
  +    <dt>XML</dt>
  +    <dd>defines a flexible still highly structured paradigm for web
  +      content generation and distribution.</dd>
  +  </dl>
     <p>Many server side dynamic web content generators have been evaluated and confronted,
     especially WebMacro and GSP.</p>
   </s2>
  @@ -189,9 +193,12 @@
     verbosity of XSP document, allowing the inclusion the default DTD via entity mapping. The
     standard way to include the XSP DTD into XSP documents is:</p>
   
  -  <source><![CDATA[
  -   <!DOCTYPE page PUBLIC "-//Apache//DTD XSP Layer 1//EN" "http://www.apache.org/1999/XSP/Layer1">  
  -  ]]></source>
  +<source><![CDATA[
  +<!DOCTYPE page PUBLIC 
  +   "-//Apache//DTD XSP Layer 1//EN" 
  +   "http://www.apache.org/1999/XSP/Layer1"
  +>
  +]]></source>
   
   </s2>
   
  @@ -206,48 +213,51 @@
     designed to include as content mark-up elements that belong to other namespaces.
     The XSchema effort will allow multi-namespace validation.</p>
   
  -  <source><![CDATA[
  -  
  -  <!ENTITY % elements "xsp:expr | xsp:element | xsp:pi | xsp:comment">
  -  
  -  <!ELEMENT xsp:page (xsp:structure?, xsp:logic?, xsp:content)>
  -  <!ATTLIST xsp:page
  -    language CDATA #REQUIRED
  -    result-ns NMTOKEN #IMPLIED
  -    default-space (preserve|strip) "preserve"
  -    indent-result (yes|no) "no"
  -    xmlns:xsp CDATA #FIXED "http://www.apache.org/1999/XSP/Layer1"
  -    xml:space (default|preserve) "preserve"
  -  >
  -  
  -  <!ELEMENT xsp:structure (xsp:dtd?, xsp:include*)>
  -  
  -  <!ELEMENT xsp:dtd (#PCDATA)>
  -  <!ELEMENT xsp:include (#PCDATA)>
  -  
  -  <!ELEMENT xsp:content (#PCDATA | xsp:logic | %elements;)*>
  -  
  -  <!ELEMENT xsp:logic (#PCDATA | xsp:content | %element;)*>
  -  <!ATTLIST xsp:logic xml:space (default|preserve) "preserve">
  -  
  -  <!ELEMENT xsp:element
  -            (#PCDATA | 
  -            xsp:attribute | 
  -            xsp:element | 
  -            xsp:logic)*>
  -  <!ATTLIST xsp:element
  -            name CDATA #REQUIRED>
  -  
  -  <!ELEMENT xsp:attribute (#PCDATA)>
  -  <!ATTLIST xsp:attribute 
  -            name CDATA #REQUIRED
  -            xml:space (default|preserve) "preserve">
  -  
  -  <!ELEMENT xsp:pi (#PCDATA | xsp:expr>
  -  <!ELEMENT xsp:comment (#PCDATA | xsp:expr)>
  -  <!ELEMENT xsp:expr (#PCDATA)>  
  -  
  -  ]]></source>
  +<source><![CDATA[
  +
  +<!ENTITY % elements "xsp:expr | 
  +                     xsp:element | 
  +                     xsp:pi | 
  +                     xsp:comment">
  +
  +<!ELEMENT xsp:page (xsp:structure?, xsp:logic?, xsp:content)>
  +<!ATTLIST xsp:page
  +  language CDATA #REQUIRED
  +  result-ns NMTOKEN #IMPLIED
  +  default-space (preserve|strip) "preserve"
  +  indent-result (yes|no) "no"
  +  xmlns:xsp CDATA #FIXED "http://www.apache.org/1999/XSP/Layer1"
  +  xml:space (default|preserve) "preserve"
  +>
  +
  +<!ELEMENT xsp:structure (xsp:dtd?, xsp:include*)>
  +
  +<!ELEMENT xsp:dtd (#PCDATA)>
  +<!ELEMENT xsp:include (#PCDATA)>
  +
  +<!ELEMENT xsp:content (#PCDATA | xsp:logic | %elements;)*>
  +
  +<!ELEMENT xsp:logic (#PCDATA | xsp:content | %element;)*>
  +<!ATTLIST xsp:logic xml:space (default|preserve) "preserve">
  +
  +<!ELEMENT xsp:element
  +          (#PCDATA | 
  +          xsp:attribute | 
  +          xsp:element | 
  +          xsp:logic)*>
  +<!ATTLIST xsp:element
  +          name CDATA #REQUIRED>
  +
  +<!ELEMENT xsp:attribute (#PCDATA)>
  +<!ATTLIST xsp:attribute 
  +          name CDATA #REQUIRED
  +          xml:space (default|preserve) "preserve">
  +
  +<!ELEMENT xsp:pi (#PCDATA | xsp:expr>
  +<!ELEMENT xsp:comment (#PCDATA | xsp:expr)>
  +<!ELEMENT xsp:expr (#PCDATA)>  
  +
  +]]></source>
     
   </s2>
   </s1>
  @@ -275,77 +285,82 @@
     of this specification to define a way to associate transformation sheets to pages. The
     associated logicsheet that uses the Java language as logic definition may look like:</p>
     
  -  <source><![CDATA[
  -    <?xml version="1.0"?>
  -     <xsl:transformation 
  -      xmlns:xsl="http://www.w3.org/1999/XSL/tranform" 
  -      xmlns:xsp="http://www.apache.org/1999/XSP/Layer1"
  -      result-ns="http://www.apache.org/1999/XSP/Layer1"
  -     >
  -        
  -      <xsl:template match="page">
  -       <xsp:page language="java">
  +<source><![CDATA[
  +<?xml version="1.0"?>
  +<xsl:transformation 
  + xmlns:xsl="http://www.w3.org/1999/XSL/tranform" 
  + xmlns:xsp="http://www.apache.org/1999/XSP/Layer1"
  + result-ns="http://www.apache.org/1999/XSP/Layer1"
  +>
  +   
  + <xsl:template match="page">
  +  <xsp:page language="java">
   
  -        <xsp:structure>
  -         <xsp:include>java.lang.*</xsp:include>
  -        </xsp:structure>
  -          
  -        <xsp:logic>
  -         private static int counter = 0;
  -              
  -         private synchronized int currentCount() {
  -           return ++counter;
  -         }
  -        </xsp:logic>
  -           
  -        <xsp:content>
  -         <page>
  -          <xsl:apply-templates/>
  -         </page>
  -        </xsp:content>
  -       </xsp:page>
  -      </xsl:template>
  +   <xsp:structure>
  +    <xsp:include>java.lang.*</xsp:include>
  +   </xsp:structure>
  +     
  +   <xsp:logic>
  +    private static int counter = 0;
            
  -      <xsl:template match="counter">    
  -       <xsp:expr>currentCount()</xsp:expr>
  -      </xsl:template>
  -
  -      <!-- Transcribe everything else verbatim -->
  -      <xsl:template match="*|@*|comment()|pi()|text()">
  -       <xsl:copy>
  -        <xsl:apply-templates/>
  -       </xsl:copy>
  -      </xsl:template>
  -    ]]></source>
  +    private synchronized int currentCount() {
  +      return ++counter;
  +    }
  +   </xsp:logic>
  +      
  +   <xsp:content>
  +    <page>
  +     <xsl:apply-templates/>
  +    </page>
  +   </xsp:content>
  +  </xsp:page>
  + </xsl:template>
  +    
  + <xsl:template match="counter">    
  +  <xsp:expr>currentCount()</xsp:expr>
  + </xsl:template>
  +
  + <!-- Transcribe everything else verbatim -->
  + <xsl:template match="*|@*|comment()|pi()|text()">
  +  <xsl:copy>
  +   <xsl:apply-templates/>
  +  </xsl:copy>
  + </xsl:template>
  +</xsl:transformation>
  +]]></source>
       
     <p>After applying the above logic sheet, the resulting document would be equivalent to the
     following:</p>
     
  -  <source><![CDATA[
  -    <xsp:page 
  -     result-ns="http://www.dummy.org/SimpleHomepageDTD"
  -     language="java">
  -
  -     <xsp:structure>
  -      <xsp:include>java.lang.*</xsp:include>
  -     </xsp:structure>
  +<source><![CDATA[
  +<xsp:page 
  + result-ns="http://www.dummy.org/SimpleHomepageDTD"
  + language="java">
  +
  + <xsp:structure>
  +  <xsp:include>java.lang.*</xsp:include>
  + </xsp:structure>
   
  -     <xsp:logic>
  -      private static int counter = 0;
  -            
  -      private synchronized int currentCount() {
  -        return ++counter;
  -      }
  -     </xsp:logic>
  -
  -     <xsp:content>
  -      <page>
  -       <title>A Sample XSP Page</title>
  -       <p>Hi, I've been hit <xsp:expr>currentCount()</xsp:expr> times.</p>
  -      </page>
  -     </xsp:content>
  -    </xsp:page>     
  -  ]]></source>
  + <xsp:logic>
  +  private static int counter = 0;
  +        
  +  private synchronized int currentCount() {
  +    return ++counter;
  +  }
  + </xsp:logic>
  +
  + <xsp:content>
  +  <page>
  +   <title>A Sample XSP Page</title>
  +   <p>
  +    Hi, I've been hit 
  +     <xsp:expr>currentCount()</xsp:expr>
  +    times.
  +   </p>
  +  </page>
  + </xsp:content>
  +</xsp:page>     
  +]]></source>
     
     <p>At this point it's worth to note that from an XSP point of view, there is 
        no difference in how the XSP page was created, either directly written or 
  @@ -355,57 +370,63 @@
        servlets were omitted for simplicity and this example must not be 
        considered mandating as a way to format XSP into servlet source code]</p>
     
  -  <source><![CDATA[
  -    // package automatically created from the full request URL...
  -    package org.apache.cocoon.xsp.example;
  -
  -    // packages imported automatically by source code generator
  -    import java.io.*;
  -    import java.util.*;
  -    import javax.servlet.*;
  -    import javax.servlet.http.*;
  -    import org.w3c.dom.*;
  -      
  -    // packages imported due to XSP structure
  -    import java.lang.*;
  -
  -    // class name automatically created from the request URI file name...
  -    public class Counter extends HttpServlet {
  +<source><![CDATA[
  +// package automatically created from the full request URL...
  +package org.apache.cocoon.xsp.example;
  +
  +// packages imported automatically by source code generator
  +import java.io.*;
  +import java.util.*;
  +import javax.servlet.*;
  +import javax.servlet.http.*;
  +import org.w3c.dom.*;
  +  
  +// packages imported due to XSP structure
  +import java.lang.*;
  +
  +// class name automatically created from the 
  +// request URI file name...
  +public class Counter extends HttpServlet {
  +
  +  public void init(ServletConfig config) 
  +    throws ServletException
  +  {
  +    super.init(config);
  +  }
   
  -      public void init(ServletConfig config) throws ServletException {
  -        super.init(config);
  -      }
  -
  -      private static int counter = 0;
  -                
  -      private synchronized int currentCount() {
  -        return ++counter;
  -      }
  -     
  -      public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
  -        Document document = parser.createEmptyDocument();
  -        Element root = document.createElement("page");
  -        document.appendChild(root);
  -      
  -        Element element_1 = document.createElement("title");
  -        root.appendChild(element_1);
  -        Text textNode_1 = document.createTextNode("A Sample XSP Page");
  -        element_1.appendChild(textNode_1);
  -
  -        Element element_2 = document.createElement("p");
  -        root.appendChild(element_2);
  -        Text textNode_2 = document.createTextNode("Hi, I've been hit ");
  -        element_2.appendChild(textNode_2);
  -        Text textNode_3 = document.createTextNode((new StringBuffer.append(currentCount())).toString());
  -        element_2.appendChild(textNode_3);
  -        Text textNode_4 = document.createTextNode("times.");
  -        element_2.appendChild(textNode_4);
  -      
  -        // Produce generated DOM tree on output as an XML stream
  -        ((Child) document).toXMLString(response.getWriter());
  -      }
  -    }  
  -  ]]></source>  
  +  private static int counter = 0;
  +            
  +  private synchronized int currentCount() {
  +    return ++counter;
  +  }
  + 
  +  public void service(HttpServletRequest request, 
  +       HttpServletResponse response) throws IOException 
  +  {
  +    Document document = parser.createEmptyDocument();
  +    Element root = document.createElement("page");
  +    document.appendChild(root);
  +  
  +    Element element_1 = document.createElement("title");
  +    root.appendChild(element_1);
  +    Text textNode_1 = document.createTextNode("A Sample XSP Page");
  +    element_1.appendChild(textNode_1);
  +
  +    Element element_2 = document.createElement("p");
  +    root.appendChild(element_2);
  +    Text textNode_2 = document.createTextNode("Hi, I've been hit ");
  +    element_2.appendChild(textNode_2);
  +    StringBuffer buffer_1 = new StringBuffer.append(currentCount());
  +    Text textNode_3 = document.createTextNode(string_1.toString());
  +    element_2.appendChild(textNode_3);
  +    Text textNode_4 = document.createTextNode("times.");
  +    element_2.appendChild(textNode_4);
  +  
  +    // Produce generated DOM tree on output as an XML stream
  +    ((Child) document).toXMLString(response.getWriter());
  +  }
  +}  
  +]]></source>  
    
     <p>Note that in this example the XML document is being generated as a <em>stream</em>
     but a DOM tree is used to create it. The DOM tree can't be passed directly to
  @@ -417,51 +438,59 @@
     <p>To solve this problem and speed up the execution on server side XML
     processing, the XSP can be compiled into something like this:</p>
   
  -  <source><![CDATA[
  -    // package automatically created from the full request URL...
  -    package org.apache.cocoon.xsp.example;
  +<source><![CDATA[
  +// package automatically created from the full request URL...
  +package org.apache.cocoon.xsp.example;
  +
  +// packages imported automatically by source code generator
  +import java.io.*;
  +import java.util.*;
  +import org.xml.sax.*;
  +import org.apache.cocoon.*;
  +  
  +// packages imported due to XSP structure
  +import java.lang.*;
  +
  +// class name automatically created from the 
  +// request URI file name...
  +public class Counter extends AbstractProducer {
  +
  +  private static final char[] chars_0 = 
  +   {'A',' ','S','i','m','p','l','e',' ','X','S','P',' ','P','a','g','e'};
  +  private static final char[] chars_1 = 
  +   {'H','i',' ','I','\'','v','e',' ','b','e','e','n',' ','h','i','t',' '};
  +  private static final char[] chars_3 = 
  +   {' ','t','i','m','e','s'};
   
  -    // packages imported automatically by source code generator
  -    import java.io.*;
  -    import java.util.*;
  -    import org.xml.sax.*;
  -    import org.apache.cocoon.*;
  -      
  -    // packages imported due to XSP structure
  -    import java.lang.*;
  -
  -    // class name automatically created from the request URI file name...
  -    public class Counter extends AbstractProducer {
  -
  -      private static final char[] chars_0 = {'A',' ','S','i','m','p','l','e',' ','X','S','P',' ','P','a','g','e'};
  -      private static final char[] chars_1 = {'H','i',' ','I','\'','v','e',' ','b','e','e','n',' ','h','i','t',' '};
  -      private static final char[] chars_3 = {' ','t','i','m','e','s'};
  -
  -      private static int counter = 0;
  -                
  -      private synchronized int currentCount() {
  -        return ++counter;
  -      }
  -     
  -      public void toSAX(Request request, DocumentHandler handler) throws SAXException {
  -        handler.startDocument();
  -          handler.startElement("page", null);
  -            handler.startElement("title", null);
  -              handler.characters(chars_0, 0, 17);
  -            handler.endElement("title");
  -            handler.startElement("p", null);
  -              handler.characters(chars_1, 0, 17);
  -              String string_0 = new StringBuffer.append(currentCount())).toString();
  -              int string_0_length = string_0.length();
  -              char[] chars_2 = char[string_0_length];
  -              string_0.getChars(0, string_0_length, chars_2, 0);
  -              handler.characters(chars_3, 0, 6);
  -            handler.endElement("p");
  -          handler.endElement("page");
  -        handler.endDocument();
  -      }
  -    }  
  -  ]]></source>
  +  private static int counter = 0;
  +            
  +  private synchronized int currentCount() {
  +    return ++counter;
  +  }
  + 
  +  public void toSAX(Request request, DocumentHandler handler) 
  +    throws SAXException 
  +  {
  +    handler.startDocument();
  +      handler.startElement("page", null);
  +        handler.startElement("title", null);
  +          handler.characters(chars_0, 0, 17);
  +        handler.endElement("title");
  +        handler.startElement("p", null);
  +          handler.characters(chars_1, 0, 17);
  +          String string_0 = (new StringBuffer.append(
  +            currentCount()
  +          )).toString();
  +          int string_0_length = string_0.length();
  +          char[] chars_2 = char[string_0_length];
  +          string_0.getChars(0, string_0_length, chars_2, 0);
  +          handler.characters(chars_3, 0, 6);
  +        handler.endElement("p");
  +      handler.endElement("page");
  +    handler.endDocument();
  +  }
  +}  
  +]]></source>
   
     <p>The above shows one of the best features of XSP: output independence.
     Since the output objects are not accessible directly from the internal page
  @@ -528,64 +557,67 @@
     programming code by <code>scriptlet</code> tags. The following is an example to show
     the different results based on the same logic and code.</p>
     
  -  <source><![CDATA[
  +<source><![CDATA[
  +<xsp:logic>
  + e = request.getParameterNames(); 
  + if ((e != null) &amp;&amp; (e.hasMoreElements())) {
  +  <xsl:content>
  +   <list>
  +    <title>Servlet Parameters</title>
       <xsp:logic>
  -      e = request.getParameterNames(); 
  -      if ((e != null) &amp;&amp; (e.hasMoreElements())) {
  -         <xsl:content>
  -           <list>
  -             <title>Servlet Parameters</title>
  -             <xsp:logic>
  -                while (e.hasMoreElements()) { 
  -                   String k = (String) e.nextElement();
  -                   String val = request.getParameter(k); 
  -                   String vals[] = request.getParameterValues(k);
  -                   <xsp:element name="element">
  -                      <xsp:attribute name="name">
  -                         <xsp:expr>k</xsp:expr>
  -                      </xsp:attribute>
  -                      <xsp:logic>
  -                         for(int i = 0; i &lt; vals.length; i++) {
  -                            <item>
  -                               <xsp:expr>vals[i]</xsp:expr>
  -                            </item>
  -                         }
  -                      </xsp:logic>
  -                   </xsp:element>
  -                 }
  -              </xsp:logic>
  -           </list>
  -         </xsl:content>
  -       } 
  -    </xsp:logic>  
  -  ]]></source>
  +     while (e.hasMoreElements()) { 
  +      String k = (String) e.nextElement();
  +      String val = request.getParameter(k); 
  +      String vals[] = request.getParameterValues(k);
  +      <xsp:element name="element">
  +       <xsp:attribute name="name">
  +        <xsp:expr>k</xsp:expr>
  +       </xsp:attribute>
  +       <xsp:logic>
  +        for(int i = 0; i &lt; vals.length; i++) {
  +         <item>
  +          <xsp:expr>vals[i]</xsp:expr>
  +         </item>
  +        }
  +       </xsp:logic>
  +      </xsp:element>
  +     }
  +    </xsp:logic>
  +   </list>
  +  </xsl:content>
  + } 
  +</xsp:logic>  
  +]]></source>
   
     <p>This is the JSP equivalent:</p>
     
  -  <source><![CDATA[
  +<source><![CDATA[
  +<jsp:scriplet>
  + e = request.getParameterNames(); 
  + if ((e != null) &amp;&amp; (e.hasMoreElements())) {
  +</jsp:scriplet>
  +  <list>
  +   <title>Servlet Parameters</title>
      <jsp:scriplet>
  -     e = request.getParameterNames(); 
  -     if ((e != null) &amp;&amp; (e.hasMoreElements())) { </jsp:scriplet>
  -       <list>
  -       <title>Servlet Parameters</title>
  -         <jsp:scriplet>
  -         while (e.hasMoreElements()) { 
  -           String k = (String) e.nextElement();
  -           String val = request.getParameter(k); 
  -           String vals[] = request.getParameterValues(k);
  -           out.println("&lt;element name=\"name\"&gt;"); </jsp:scriplet>
  -           <jsp:expression>k</jsp:expression>
  -           <jsp:scriplet>
  -           out.println("&lt;/element&gt;");
  -           for(int i = 0; i &lt; vals.length; i++) { </jsp:scriplet>
  -             <item>
  -               <jsp:expression>vals[i]</jsp:expression>
  -             </item>
  -           <jsp:scriplet>}</jsp:scriplet>
  -         <jsp:scriplet>}</jsp:scriplet>
  -       </list>
  -     <jsp:scriplet>}</jsp:scriplet>  
  -  ]]></source>
  +     while (e.hasMoreElements()) { 
  +      String k = (String) e.nextElement();
  +      String val = request.getParameter(k); 
  +      String vals[] = request.getParameterValues(k);
  +      out.println("&lt;element name=\"name\"&gt;");
  +   </jsp:scriplet>
  +      <jsp:expression>k</jsp:expression>
  +      <jsp:scriplet>
  +       out.println("&lt;/element&gt;");
  +       for(int i = 0; i &lt; vals.length; i++) {
  +      </jsp:scriplet>
  +        <item>
  +         <jsp:expression>vals[i]</jsp:expression>
  +        </item>
  +      <jsp:scriplet>}</jsp:scriplet>
  +    <jsp:scriplet>}</jsp:scriplet>
  +  </list>
  +<jsp:scriplet>}</jsp:scriplet>  
  +]]></source>
   
     <p>It must be noted the use of the <code>out</code> object in the JSP example while
     XSP provide specific tags to avoid that.</p>
  
  
  
  1.1                  xml-cocoon/docs/book.xml
  
  Index: book.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <book title="Cocoon documentation" copyright="1999 The Apache Software Foundation">
  
    <external href="../index.html"  label="Back"/>
    
    <separator/>
    
    <document id="index" label="Index" source="cocoon/index-sbk.xml"/>
    <document id="license" label="License" source="cocoon/license-sbk.xml"/>
    <document id="install" label="Install" source="cocoon/installing-sbk.xml"/>
    <external href="../dist"  label="Download"/>
    
    <separator/>
    
    <document id="technologies" label="Technologies" source="cocoon/technologies-sbk.xml"/>
    <document id="guide" label="User Guide" source="cocoon/guide-sbk.xml"/>
    <document id="dynamic" label="Dynamic Content" source="cocoon/dynamic-sbk.xml"/>
    <document id="dcp" label="DCP Processor" source="cocoon/dcpprocessor-sbk.xml"/>
    <document id="sql" label="SQL Processor" source="cocoon/sqlprocessor-sbk.xml"/>
  
    <separator/>
  
    <document id="cocoon2" label="Cocoon 2" source="cocoon/cocoon2-sbk.xml"/>
    <document id="xsp" label="XSP WD" source="cocoon/WD-xsp-sbk.xml"/>
    <document id="javadoc" label="Javadoc XML" source="cocoon/javadoc-sbk.xml"/>
  
    <separator/>
  
    <faqs id="faqs" label="FAQ" source="cocoon/faq-sbk.xml"/>
    <document id="changes" label="Changes" source="cocoon/changes-sbk.xml"/>
    <document id="todo" label="Todo" source="cocoon/todo-sbk.xml"/>
    
  </book>
  
  
  

Mime
View raw message