cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@locus.apache.org
Subject cvs commit: xml-cocoon/xdocs/drafts sitemap-working-draft.xmap
Date Tue, 11 Jul 2000 23:47:05 GMT
giacomo     00/07/11 16:47:05

  Modified:    .        Tag: xml-cocoon2 build.xml
               conf     Tag: xml-cocoon2 cocoon.xconf
               src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
               src/org/apache/cocoon/components/language/markup/sitemap/java
                        Tag: xml-cocoon2 sitemap.xsl
               src/org/apache/cocoon/components/language/markup/xsp Tag:
                        xml-cocoon2 XSPGenerator.java
               src/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: xml-cocoon2 xsp.xsl
               src/org/apache/cocoon/sitemap Tag: xml-cocoon2
                        GenericProcessor.java ResourcePipeline.java
               xdocs    Tag: xml-cocoon2 docs-book.xml sitemap.xml
               xdocs/drafts Tag: xml-cocoon2 sitemap-working-draft.xmap
  Added:       src/org/apache/cocoon/matching Tag: xml-cocoon2
                        AuthenticationMatcher.java
                        BrowserMatcherFactory.java
                        FileAuthenticationMatcher.java Matcher.java
                        MatcherFactory.java WildcardURIMatcherFactory.java
               src/org/apache/cocoon/matching/helpers Tag: xml-cocoon2
                        WildcardURIMatcher.java
               src/org/apache/cocoon/selection Tag: xml-cocoon2
                        Selector.java
               src/org/apache/cocoon/serialization Tag: xml-cocoon2
                        AbstractSerializer.java FO2PDFSerializer.java
                        HTMLSerializer.java ImageSerializer.java
                        SVGSerializer.java Serializer.java
                        XMLSerializer.java
               src/org/apache/cocoon/transformation Tag: xml-cocoon2
                        AbstractTransformer.java LogTransformer.java
                        SQLTransformer.java Transformer.java
                        XIncludeTransformer.java XalanTransformer.java
  Log:
  changeing to naming standard
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.13  +1 -1      xml-cocoon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/build.xml,v
  retrieving revision 1.6.2.12
  retrieving revision 1.6.2.13
  diff -u -r1.6.2.12 -r1.6.2.13
  --- build.xml	2000/06/14 02:04:33	1.6.2.12
  +++ build.xml	2000/07/11 23:46:29	1.6.2.13
  @@ -88,7 +88,7 @@
       <property name="build.compiler" value="classic"/>
       <property name="debug"          value="on"/>
       <property name="optimize"       value="on"/>
  -    <property name="deprecation"    value="on"/>
  +    <property name="deprecation"    value="off"/>
   
       <property name="src.dir"     value="./src"/>
       <property name="lib.dir"     value="./lib"/>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.10  +26 -26    xml-cocoon/conf/Attic/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/conf/Attic/cocoon.xconf,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- cocoon.xconf	2000/07/11 03:09:30	1.1.2.9
  +++ cocoon.xconf	2000/07/11 23:46:32	1.1.2.10
  @@ -37,7 +37,7 @@
           </target-language>
         </component-instance>
   
  -      <component-instance name="sitemap" class="org.apache.cocoon.components.language.markup.xsp.SitemapMarkupLanguage">
  +      <component-instance name="sitemap" class="org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage">
           <parameter name="prefix" value="map"/>
           <parameter name="uri" value="http://xml.apache.org/cocoon/sitemap"/>
     
  @@ -55,21 +55,21 @@
   
   <!-- ===================== Pipeline Components =========================== -->
   
  -  <generator  name="file"      class="org.apache.cocoon.generators.FileGenerator"/>
  -  <generator  name="request"   class="org.apache.cocoon.generators.RequestGenerator"/>
  -  <generator  name="directory" class="org.apache.cocoon.generators.DirectoryGenerator"/>
  -  <generator  name="serverpages" class="org.apache.cocoon.generators.ServerPagesGenerator"/>
  +  <generator  name="file"      class="org.apache.cocoon.generation.FileGenerator"/>
  +  <generator  name="request"   class="org.apache.cocoon.generation.RequestGenerator"/>
  +  <generator  name="directory" class="org.apache.cocoon.generation.DirectoryGenerator"/>
  +  <generator  name="serverpages" class="org.apache.cocoon.generation.ServerPagesGenerator"/>
     
  -  <filter     name="xslt"      class="org.apache.cocoon.filters.XalanFilter"/>
  -  <filter     name="log"       class="org.apache.cocoon.filters.LogFilter"/>
  -  <filter     name="sql"       class="org.apache.cocoon.filters.SQLFilter"/>
  -  <filter     name="xinclude"  class="org.apache.cocoon.filters.XIncludeFilter"/>
  +  <transformer     name="xslt"      class="org.apache.cocoon.transformation.XalanTransformer"/>
  +  <transformer     name="log"       class="org.apache.cocoon.transformation.LogTransformer"/>
  +  <transformer     name="sql"       class="org.apache.cocoon.transformation.SQLTransformer"/>
  +  <transformer     name="xinclude"  class="org.apache.cocoon.transformation.XIncludeTransformer"/>
     
  -  <serializer name="xml"       class="org.apache.cocoon.serializers.XMLSerializer"/>
  -  <serializer name="html"      class="org.apache.cocoon.serializers.HTMLSerializer"/>
  -  <serializer name="fo2pdf"    class="org.apache.cocoon.serializers.FO2PDFSerializer"/>
  -  <serializer name="svg2jpg"   class="org.apache.cocoon.serializers.SVGSerializer"/>
  -  <serializer name="image"     class="org.apache.cocoon.serializers.ImageSerializer"/>
  +  <serializer name="xml"       class="org.apache.cocoon.serialization.XMLSerializer"/>
  +  <serializer name="html"      class="org.apache.cocoon.serialization.HTMLSerializer"/>
  +  <serializer name="fo2pdf"    class="org.apache.cocoon.serialization.FO2PDFSerializer"/>
  +  <serializer name="svg2jpg"   class="org.apache.cocoon.serialization.SVGSerializer"/>
  +  <serializer name="image"     class="org.apache.cocoon.serialization.ImageSerializer"/>
     
   <!-- ============================== Sitemap ================================ -->
     
  @@ -78,9 +78,9 @@
   
         <process uri="welcome" source="documents/welcome.xml">
           <generator name="file"/>
  -        <filter name="xslt">
  +        <transformer name="xslt">
             <parameter name="stylesheet" value="stylesheets/simple-welcome2html.xsl"/>
  -        </filter>
  +        </transformer>
           <serializer name="html">
             <parameter name="contentType" value="text/html"/>
           </serializer>
  @@ -88,9 +88,9 @@
   
         <process uri="hello" source="documents/hello-page.xml">
           <generator name="file"/>
  -        <filter name="xslt">
  +        <transformer name="xslt">
             <parameter name="stylesheet" value="stylesheets/simple-page2html.xsl"/>
  -        </filter>
  +        </transformer>
           <serializer name="html">
             <parameter name="contentType" value="text/html"/>
           </serializer>
  @@ -98,9 +98,9 @@
   
         <process uri="java.apache.org" source="documents/java_apache_org.xml">
           <generator name="file"/>
  -        <filter name="xslt">
  +        <transformer name="xslt">
             <parameter name="stylesheet" value="stylesheets/java_apache_org-html.xsl"/>
  -        </filter>
  +        </transformer>
           <serializer name="html">
             <parameter name="contentType" value="text/html"/>
           </serializer>
  @@ -108,9 +108,9 @@
   
         <process uri="jakarta.apache.org" source="documents/jakarta_apache_org.xml">
           <generator name="file"/>
  -        <filter name="xslt">
  +        <transformer name="xslt">
             <parameter name="stylesheet" value="stylesheets/jakarta_apache_org-html.xsl"/>
  -        </filter>
  +        </transformer>
           <serializer name="html">
             <parameter name="contentType" value="text/html"/>
           </serializer>
  @@ -118,9 +118,9 @@
   
         <process uri="simple_dynamic_page" source="documents/simple-dynamic-page.xsp">
           <generator name="serverpages"/>
  -        <filter name="xslt">
  +        <transformer name="xslt">
             <parameter name="stylesheet" value="stylesheets/dynamic-page2html.xsl"/>
  -        </filter>
  +        </transformer>
           <serializer name="html">
             <parameter name="contentType" value="text/html"/>
           </serializer>
  @@ -128,9 +128,9 @@
         
         <process uri="**/" source="**/">
           <generator name="directory"/>
  -        <filter name="xslt">
  +        <transformer name="xslt">
             <parameter name="stylesheet" value="stylesheets/simple-directory2html.xsl"/>
  -        </filter>
  +        </transformer>
           <serializer name="html">
             <parameter name="contentType" value="text/html"/>
           </serializer>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.10  +5 -4      xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.4.2.9
  retrieving revision 1.4.2.10
  diff -u -r1.4.2.9 -r1.4.2.10
  --- Cocoon.java	2000/07/11 03:09:35	1.4.2.9
  +++ Cocoon.java	2000/07/11 23:46:34	1.4.2.10
  @@ -26,7 +26,7 @@
   import org.apache.avalon.ConfigurationException;
   import org.apache.avalon.SAXConfigurationBuilder;
   import org.apache.cocoon.components.parser.Parser;
  -import org.apache.cocoon.serializers.Serializer;
  +import org.apache.cocoon.serialization.Serializer;
   import org.apache.cocoon.sitemap.Sitemap;
   import org.xml.sax.EntityResolver;
   import org.xml.sax.InputSource;
  @@ -36,7 +36,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.4.2.9 $ $Date: 2000/07/11 03:09:35 $
  + * @version CVS $Revision: 1.4.2.10 $ $Date: 2000/07/11 23:46:34 $
    */
   public class Cocoon
   implements Component, Configurable, ComponentManager, Modifiable, Processor,
  @@ -142,8 +142,8 @@
               throw new ConfigurationException("Invalid configuration file",conf);
           if (!conf.getAttribute("version").equals("2.0"))
               throw new ConfigurationException("Invalid version",conf);
  -        // Set generators, filters and serializers
  -        String buf[]={"generator","filter","serializer"};
  +        // Set generators, transformers and serializers
  +        String buf[]={"generator","transformer","serializer"};
           for (int x=0; x<buf.length; x++) {
               Enumeration e=conf.getConfigurations(buf[x]);
               while (e.hasMoreElements()) {
  @@ -261,6 +261,7 @@
                   programGenerator.load(file, markupLanguage, programmingLanguage);
               System.out.println ("C2 generateSitemap: generator obtained");
               processor.setComponentManager(this);
  +            processor.setConfiguration(null);
               System.out.println ("C2 generateSitemap: generator called");
           } catch (Exception e) {
               e.printStackTrace();
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +56 -19    xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl
  
  Index: sitemap.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- sitemap.xsl	2000/07/11 03:09:41	1.1.2.5
  +++ sitemap.xsl	2000/07/11 23:46:36	1.1.2.6
  @@ -3,12 +3,17 @@
   
   <xsl:stylesheet version="1.0"
     xmlns:map="http://apache.org/cocoon/sitemap/1.0" 
  +  xmlns:java="http://xml.apache.org/xslt/java"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   >
   
     <xsl:output method="text"/>
   
     <xsl:variable name="prefix">map</xsl:variable>
  +  <xsl:variable name="matcher-factory-loader" select="java:org.apache.cocoon.sitemap.XSLTMatcherFactoryLoader.new()"/>
  +<!--
  +  <xsl:variable name="selector-factory-loader" select="java:org.apache.cocoon.sitemap.XSLTSelectorFactoryLoader.new()"/>
  +-->
   
     <xsl:template match="/">
       <code xml:space="preserve">
  @@ -29,18 +34,20 @@
       import org.apache.avalon.utils.Parameters; 
       import org.apache.cocoon.Request;
       import org.apache.cocoon.Response;
  -    import org.apache.cocoon.choosers.Chooser;
  -    import org.apache.cocoon.filters.Filter;
  -    import org.apache.cocoon.generators.Generator;
  -    import org.apache.cocoon.matchers.Matcher;
  -    import org.apache.cocoon.serializers.Serializer;
  +    import org.apache.cocoon.selection.Selector;
  +    import org.apache.cocoon.transformation.Transformer;
  +    import org.apache.cocoon.generation.Generator;
  +    import org.apache.cocoon.matching.Matcher;
  +    import org.apache.cocoon.serialization.Serializer;
       import org.apache.cocoon.sitemap.AbstractSitemapProcessor;
       import org.apache.cocoon.sitemap.ResourcePipeline;
   
  +    import org.xml.sax.helpers.AttributesImpl;
  +
   /**
    *
    * @author &lt;a href="mailto:Giacomo.Pati@pwr.ch"&gt;Giacomo Pati&lt;/a&gt;
  - * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/07/11 03:09:41 $
  + * @version CVS $Revision: 1.1.2.6 $ $Date: 2000/07/11 23:46:36 $
    */
   public class <xsl:value-of select="@file-name"/> extends AbstractSitemapProcessor
{
       
  @@ -64,13 +71,13 @@
       </xsl:for-each>
       
       /** The matchers */
  -    <xsl:for-each select="/map:sitemap/map:components/map:matchers/map:matcher">
  +    <xsl:for-each select="/map:sitemap/map:components/map:matchers/map:matcher[@src]">
         private Matcher matcher_<xsl:value-of select="translate(./@type, '- ', '__')"/>
= null;
       </xsl:for-each>
         
  -    /** The choosers */  
  -    <xsl:for-each select="/map:sitemap/map:components/map:choosers/map:chooser">
  -      private Chooser chooser_<xsl:value-of select="translate(./@type, '- ', '__')"/>
= null;
  +    /** The selectors */  
  +    <xsl:for-each select="/map:sitemap/map:components/map:selctors/map:selector[@src]">
  +      private Selector selector_<xsl:value-of select="translate(./@type, '- ', '__')"/>
= null;
       </xsl:for-each>
         
       /** The sub sitemaps */  
  @@ -78,6 +85,36 @@
         SitemapProcessor sitemap_<xsl:value-of select="translate(@src, ':@./-{}#', '_____')"/>
= null;
       </xsl:for-each>
   
  +    /** The generated matchers */
  +    <xsl:for-each select="/map:sitemap/map:components/map:matchers/map:matcher[@factory]">
  +      <xsl:variable name="factory" select="@factory"/>
  +      <xsl:variable name="type" select="@type"/>
  +      <xsl:variable name="default"><xsl:if test="$type = ../@default">true</xsl:if></xsl:variable>
  +      <xsl:for-each select="/map:sitemap/map:pipelines/map:pipeline/descendant-or-self::map:match[@type=$type
or (not(@type) and $default!='')]">
  +        <xsl:variable name="matcher-name1" select="translate(@pattern,'/- *?@:{}()[].#^\\$|&#33;','_')"/>
  +        <xsl:variable name="matcher-name" select='translate($matcher-name1,"&#39;","")'/>
  +        private Map _matcher_<xsl:value-of select="$matcher-name"/> (Request request)
{
  +          <xsl:value-of select="java:getSource($matcher-factory-loader, string($factory),
string(@pattern))"/>;
  +        }
  +      </xsl:for-each>
  +    </xsl:for-each>
  +
  +    /** The generated selectors */
  +    <xsl:for-each select="/map:sitemap/map:components/map:selectors/map:selector[@factory]">
  +      <xsl:variable name="factory" select="@factory"/>
  +      <xsl:variable name="type" select="@type"/>
  +      <xsl:variable name="default"><xsl:if test="$type = ../@default">true</xsl:if></xsl:variable>
  +      <xsl:for-each select="/map:sitemap/map:pipelines/map:pipeline/descendant-or-self::map:when[../map:selector/@type=$type
or (not(../map:selector/@type) and $default!='')]">
  +        <xsl:variable name="selector-name1" select="translate(@pattern,'/- *?@:{}()[].#^\\$|&#33;','_')"/>
  +        <xsl:variable name="selector-name" select='translate($selector-name1,"&#39;","")'/>
  +        private boolean _selector_<xsl:value-of select="$selector-name"/> (Request
request) {
  +<!--
  +          <xsl:value-of select="java:getSource($selector-factory-loader, string($factory),
string(@test))"/>;
  +-->
  +        }
  +      </xsl:for-each>
  +    </xsl:for-each>
  +
       /**
        * Pass a &lt;code&gt;Configuration&lt;/code&gt; instance to this
        * &lt;code&gt;Configurable&lt;/code&gt; class.
  @@ -118,12 +155,12 @@
             select="/map:sitemap/map:components/map:matchers/map:matcher"/>
       </xsl:call-template>
       
  -    /* Configure choosers */
  +    /* Configure selectors */
       <xsl:call-template name="config-components">
  -      <xsl:with-param name="name">chooser</xsl:with-param>
  -      <xsl:with-param name="interface">Chooser</xsl:with-param>
  +      <xsl:with-param name="name">selector</xsl:with-param>
  +      <xsl:with-param name="interface">Selector</xsl:with-param>
         <xsl:with-param name="components" 
  -          select="/map:sitemap/map:components/map:choosers/map:chooser"/>
  +          select="/map:sitemap/map:components/map:selectors/map:selector"/>
       </xsl:call-template>
   
       /* Configure mounted sitemaps */
  @@ -195,11 +232,11 @@
       }
     </xsl:template> <!-- match="map:match" -->
   
  -  <xsl:template match="map:choose">
  -    <xsl:variable name="chooser-type">
  +  <xsl:template match="map:select">
  +    <xsl:variable name="selector-type">
         <xsl:call-template name="get-parameter">
           <xsl:with-param name="parname">type</xsl:with-param>
  -        <xsl:with-param name="default"><xsl:value-of select="/map:sitemap/map:components/map:choosers/@default"/></xsl:with-param>
  +        <xsl:with-param name="default"><xsl:value-of select="/map:sitemap/map:components/map:selectors/@default"/></xsl:with-param>
         </xsl:call-template>
       </xsl:variable>
       <xsl:for-each select="./map:when">
  @@ -209,7 +246,7 @@
             <xsl:with-param name="required">true</xsl:with-param>
           </xsl:call-template>
         </xsl:variable>
  -      if (chooser_<xsl:value-of select="translate($chooser-type, '- ', '__')"/>.choose
("<xsl:value-of select="$test-value"/>", request)) {
  +      if (selector_<xsl:value-of select="translate($selector-type, '- ', '__')"/>.select
("<xsl:value-of select="$test-value"/>", request)) {
          <xsl:apply-templates/>
         }
       </xsl:for-each>
  @@ -219,7 +256,7 @@
         <xsl:apply-templates/>
         }
       </xsl:for-each>
  -  </xsl:template> <!-- match="/map:sitemap/map:choose" -->
  +  </xsl:template> <!-- match="/map:sitemap/map:select" -->
   
     <xsl:template match="map:generate">
       <xsl:call-template name="setup-component">
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +2 -2      xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPGenerator.java
  
  Index: XSPGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/Attic/XSPGenerator.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- XSPGenerator.java	2000/07/11 03:09:44	1.1.2.3
  +++ XSPGenerator.java	2000/07/11 23:46:37	1.1.2.4
  @@ -11,13 +11,13 @@
   import org.apache.avalon.ComponentManager;
   import org.apache.cocoon.components.parser.Parser;
   
  -import org.apache.cocoon.generators.AbstractServerPage;
  +import org.apache.cocoon.generation.AbstractServerPage;
   
   /**
    * Base class for XSP-generated <code>ServerPagesGenerator</code> classes
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/11 03:09:44 $
  + * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/11 23:46:37 $
    */
   public abstract class XSPGenerator extends AbstractServerPage {
     /** The XSP Object Model */
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +1 -1      xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/xsp.xsl
  
  Index: xsp.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/xsp/java/Attic/xsp.xsl,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- xsp.xsl	2000/07/11 03:09:44	1.1.2.3
  +++ xsp.xsl	2000/07/11 23:46:38	1.1.2.4
  @@ -40,7 +40,7 @@
       import org.apache.avalon.*;
       import org.apache.avalon.utils.*;
       import org.apache.cocoon.*;
  -    import org.apache.cocoon.generators.*;
  +    import org.apache.cocoon.generation.*;
       import org.apache.cocoon.components.parser.*;
   
       import org.apache.cocoon.components.language.markup.xsp.XSPGenerator;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +16 -0     xml-cocoon/src/org/apache/cocoon/matching/Attic/AuthenticationMatcher.java
  
  
  
  
  1.1.2.1   +22 -0     xml-cocoon/src/org/apache/cocoon/matching/Attic/BrowserMatcherFactory.java
  
  
  
  
  1.1.2.1   +49 -0     xml-cocoon/src/org/apache/cocoon/matching/Attic/FileAuthenticationMatcher.java
  
  
  
  
  1.1.2.1   +37 -0     xml-cocoon/src/org/apache/cocoon/matching/Attic/Matcher.java
  
  
  
  
  1.1.2.1   +24 -0     xml-cocoon/src/org/apache/cocoon/matching/Attic/MatcherFactory.java
  
  
  
  
  1.1.2.1   +150 -0    xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +205 -0    xml-cocoon/src/org/apache/cocoon/matching/helpers/Attic/WildcardURIMatcher.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +30 -0     xml-cocoon/src/org/apache/cocoon/selection/Attic/Selector.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +55 -0     xml-cocoon/src/org/apache/cocoon/serialization/Attic/AbstractSerializer.java
  
  
  
  
  1.1.2.1   +80 -0     xml-cocoon/src/org/apache/cocoon/serialization/Attic/FO2PDFSerializer.java
  
  
  
  
  1.1.2.1   +369 -0    xml-cocoon/src/org/apache/cocoon/serialization/Attic/HTMLSerializer.java
  
  
  
  
  1.1.2.1   +366 -0    xml-cocoon/src/org/apache/cocoon/serialization/Attic/ImageSerializer.java
  
  
  
  
  1.1.2.1   +162 -0    xml-cocoon/src/org/apache/cocoon/serialization/Attic/SVGSerializer.java
  
  
  
  
  1.1.2.1   +27 -0     xml-cocoon/src/org/apache/cocoon/serialization/Attic/Serializer.java
  
  
  
  
  1.1.2.1   +387 -0    xml-cocoon/src/org/apache/cocoon/serialization/Attic/XMLSerializer.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.12  +16 -16    xml-cocoon/src/org/apache/cocoon/sitemap/Attic/GenericProcessor.java
  
  Index: GenericProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/GenericProcessor.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- GenericProcessor.java	2000/07/11 03:10:03	1.1.2.11
  +++ GenericProcessor.java	2000/07/11 23:46:53	1.1.2.12
  @@ -22,9 +22,9 @@
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.Request;
   import org.apache.cocoon.Response;
  -import org.apache.cocoon.filters.Filter;
  -import org.apache.cocoon.generators.Generator;
  -import org.apache.cocoon.serializers.Serializer;
  +import org.apache.cocoon.transformation.Transformer;
  +import org.apache.cocoon.generation.Generator;
  +import org.apache.cocoon.serialization.Serializer;
   import org.apache.cocoon.sitemap.patterns.PatternException;
   import org.apache.cocoon.sitemap.patterns.PatternMatcher;
   import org.apache.cocoon.sitemap.patterns.PatternTranslator;
  @@ -35,7 +35,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2000/07/11 03:10:03 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2000/07/11 23:46:53 $
    */
   public class GenericProcessor
   implements Composer, Configurable, Processor, LinkResolver {
  @@ -52,10 +52,10 @@
       private String generator=null;
       /** The generator parameters */
       private Parameters generatorParam=null;
  -    /** The filter roles vector */
  -    private Vector filters=new Vector();
  -    /** The filter parameters vector */
  -    private Vector filtersParam=new Vector();
  +    /** The transformer roles vector */
  +    private Vector transformers=new Vector();
  +    /** The transformer parameters vector */
  +    private Vector transformersParam=new Vector();
       /** The serializer role */
       private String serializer=null;
       /** The serializer role */
  @@ -111,12 +111,12 @@
               throw new ConfigurationException("Serializer not specified",conf);
           this.serializer="serializer:"+c.getAttribute("name");
           this.serializerParam=Parameters.fromConfiguration(c);
  -        // Set up the filters vetctor
  -        Enumeration e=conf.getConfigurations("filter");
  +        // Set up the transformers vetctor
  +        Enumeration e=conf.getConfigurations("transformer");
           while (e.hasMoreElements()) {
               Configuration f=(Configuration)e.nextElement();
  -            this.filters.addElement("filter:"+f.getAttribute("name"));
  -            this.filtersParam.addElement(Parameters.fromConfiguration(f));
  +            this.transformers.addElement("transformer:"+f.getAttribute("name"));
  +            this.transformersParam.addElement(Parameters.fromConfiguration(f));
           }
       }
   
  @@ -141,10 +141,10 @@
           String partname=this.partition.name;
   
           XMLConsumer current=s;
  -        for (int x=(this.filters.size()-1); x>=0; x--) {
  -            String k=(String)this.filters.elementAt(x);
  -            Filter f=(Filter)this.manager.getComponent(k);
  -            f.setup(req,res,src,(Parameters)this.filtersParam.elementAt(x));
  +        for (int x=(this.transformers.size()-1); x>=0; x--) {
  +            String k=(String)this.transformers.elementAt(x);
  +            Transformer f=(Transformer)this.manager.getComponent(k);
  +            f.setup(req,res,src,(Parameters)this.transformersParam.elementAt(x));
               f.setConsumer(current);
               current=f;
           }
  
  
  
  1.1.2.4   +19 -19    xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java
  
  Index: ResourcePipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- ResourcePipeline.java	2000/07/11 03:10:04	1.1.2.3
  +++ ResourcePipeline.java	2000/07/11 23:46:54	1.1.2.4
  @@ -16,9 +16,9 @@
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.Request;
   import org.apache.cocoon.Response;
  -import org.apache.cocoon.generators.Generator;
  -import org.apache.cocoon.filters.Filter;
  -import org.apache.cocoon.serializers.Serializer;
  +import org.apache.cocoon.generation.Generator;
  +import org.apache.cocoon.transformation.Transformer;
  +import org.apache.cocoon.serialization.Serializer;
   import org.apache.cocoon.xml.XMLProducer;
   
   import org.xml.sax.SAXException;
  @@ -26,15 +26,15 @@
   /**
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/11 03:10:04 $
  + * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/07/11 23:46:54 $
    */
   public class ResourcePipeline {
       private Generator generator = null;
       private Parameters generatorParam = null;
       private String generatorSource = null;
  -    private Vector filters = new Vector();
  -    private Vector filterParams = new Vector();
  -    private Vector filterSources = new Vector();
  +    private Vector transformers = new Vector();
  +    private Vector transformerParams = new Vector();
  +    private Vector transformerSources = new Vector();
       private Serializer serializer = null;
       private Parameters serializerParam = null;
       private String serializerSource = null;
  @@ -54,10 +54,10 @@
           this.serializerParam = param;
       }
   
  -    public void addFilter (Filter filter, String source, Parameters param) {
  -        this.filters.add (filter);
  -        this.filterSources.add (source);
  -        this.filterParams.add (param);
  +    public void addTransformer (Transformer transformer, String source, Parameters param)
{
  +        this.transformers.add (transformer);
  +        this.transformerSources.add (source);
  +        this.transformerParams.add (param);
       }
   
       public boolean startPipeline (Request req, Response res, OutputStream out)
  @@ -71,16 +71,16 @@
           }
   
           generator.setup (req, res, generatorSource, generatorParam);
  -        Filter filter = null;
  +        Transformer transformer = null;
           XMLProducer producer = generator;
  -        int i = filters.size();
  +        int i = transformers.size();
   
           for (int j=0; j < i; j++) {
  -            filter = (Filter) filters.elementAt (j);
  -            filter.setup (req, res, (String)filterSources.elementAt (j),
  -                           (Parameters)filterParams.elementAt (j));
  -            producer.setConsumer (filter);
  -            producer = filter;
  +            transformer = (Transformer) transformers.elementAt (j);
  +            transformer.setup (req, res, (String)transformerSources.elementAt (j),
  +                           (Parameters)transformerParams.elementAt (j));
  +            producer.setConsumer (transformer);
  +            producer = transformer;
           }
   
           serializer.setup (req, res, serializerSource, generatorParam);
  @@ -89,4 +89,4 @@
           generator.generate();
           return true;
       }
  -} 
  \ No newline at end of file
  +} 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +189 -0    xml-cocoon/src/org/apache/cocoon/transformation/Attic/AbstractTransformer.java
  
  
  
  
  1.1.2.1   +313 -0    xml-cocoon/src/org/apache/cocoon/transformation/Attic/LogTransformer.java
  
  
  
  
  1.1.2.1   +523 -0    xml-cocoon/src/org/apache/cocoon/transformation/Attic/SQLTransformer.java
  
  
  
  
  1.1.2.1   +21 -0     xml-cocoon/src/org/apache/cocoon/transformation/Attic/Transformer.java
  
  
  
  
  1.1.2.1   +346 -0    xml-cocoon/src/org/apache/cocoon/transformation/Attic/XIncludeTransformer.java
  
  
  
  
  1.1.2.1   +147 -0    xml-cocoon/src/org/apache/cocoon/transformation/Attic/XalanTransformer.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.5   +1 -0      xml-cocoon/xdocs/docs-book.xml
  
  Index: docs-book.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/xdocs/docs-book.xml,v
  retrieving revision 1.4.2.4
  retrieving revision 1.4.2.5
  diff -u -r1.4.2.4 -r1.4.2.5
  --- docs-book.xml	2000/07/04 10:22:32	1.4.2.4
  +++ docs-book.xml	2000/07/11 23:47:01	1.4.2.5
  @@ -5,6 +5,7 @@
     <page id="index" label="Index" source="index.xml"/>
     <page id="license" label="License" source="license.xml"/>
     <page id="install" label="Install" source="installing.xml"/>
  +  <page id="sitemap" label="Sitemap" source="sitemap.xml"/>
     <page id="xsp-internals" label="XSP Internals" source="xsp-internals.xml"/>
     <page id="logicsheet-concepts" label="XSP Logicsheets" source="logicsheet-concepts.xml"/>
     <page id="sitemap" label="Sitemap" source="sitemap.xml"/>
  
  
  
  1.1.2.3   +116 -0    xml-cocoon/xdocs/Attic/sitemap.xml
  
  Index: sitemap.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/xdocs/Attic/sitemap.xml,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- sitemap.xml	2000/06/26 15:16:44	1.1.2.2
  +++ sitemap.xml	2000/07/11 23:47:02	1.1.2.3
  @@ -352,6 +352,122 @@
        </p>
       </s3>
      </s2>
  +
  +   <s2 title="The &lt;map:resources&gt;">
  +    <p>
  +     The <code>&lt;resource&gt;</code> element is used as a placeholder
for pipelines
  +     that are used several times inside the document. This element
  +     is redundant and its functionality is not directly related
  +     to the sitemap, but could be cloned by the use of internal
  +     XInclude, for example
  +    </p>
  +   
  +    <p>
  +     <code>&lt;xinclude:include href="#xpointer(resource[@name='Access refused'])"/&gt;</code>

  +    </p>
  +   
  +    <p>
  +     but given the usability constraints and very specific operation
  +     it is much easier to include such an element instead of forcing
  +     the use of xinclude/xpointer.
  +    </p>
  +    <source>
  +     <![CDATA[
  +      <map:resources">
  +      </map:components">
  +     ]]>
  +    </source>
  + -->
  + <map:resources>
  +  
  +  <map:resource name="Access refused">
  +   <map:generator src="./error-pages/restricted.xml"/>
  +   <map:filter src="./stylesheets/general-browser.xsl"/>
  +   <map:serializer status-code="401"/>
  +  </map:resource>
  +    
  + </map:resources>
  +
  +    <s3 title="Common Attributes of Components">
  +     <p>
  +      All components have some common attributes. The list below will show and explain
them:
  +     </p>
  +
  +     <dl>
  +      <dt>type</dt>
  +      <dd>The type attribute gives the component a reference which can be used to
point to them in the pipeline section.</dd>
  +      <dt>src</dt>
  +      <dd>Specifies where Cocoon finds the class representing this component. Note
that the content of 
  +       the src attribute must be specified as an URI. 
  +      </dd>
  +     </dl>
  +
  +     <p>
  +      The following protocols can be specified for all URI aware attributes:
  +     </p>
  +     <ul>
  +      <li>file:</li>
  +      <li>class:</li>
  +      <li>jar:</li>
  +      <li>http:</li>
  +     </ul>
  +    </s3>
  +
  +    <s3 title="Component Parameters">
  +     <p>
  +      All components will be configured with parameters specified from their child elements
at component instantiation time. 
  +      The name of the parameters is dependant of the component. The following example shows
how to specify a
  +      <code>&lt;compile-stylesheet&gt;</code> parameters to a component:
  +     </p>
  +  
  +     <source>
  +      <![CDATA[
  +       <map:components>
  +        <map:filter type="xslt" src="class:///org.apache.cocoon.filter.XSLTFilter">
  +         <compile-stylesheets value="true"/>  <!-- This is a parameter to the
filter component -->
  +        </map:filter>
  +       </map:components>
  +      ]]>
  +     </source>
  + 
  +     <note>
  +      The syntax <br/> <br/>
  +       <strong><code>&lt;xxx map:value="yyy"&gt;</code></strong>
<br/> <br/>
  +      is completely equivalent to <br/> <br/>
  +       <strong><code>&lt;xxx&gt;yyy&lt;/xxx&gt;</code></strong>
<br/> <br/>
  +       throughout the entire sitemap.. the "value" attribute is a reserved one.
  +     </note>
  +  
  +     <p>
  +      There is no given set of predefined parameters.
  +     </p>
  +    </s3>
  +
  +    <s3 title="Generators">
  +     <p>
  +      Generators generate XML content as SAX events and initialize the 
  +      pipeline processing. 
  +     </p>
  +
  +     <source>
  +      <![CDATA[
  +       <map:generators default="parser">
  +        <map:generator type="parser" src="class:///org.apache.cocoon.generator.FileGenerator"/>
  +        <map:generator type="dir"    src="file:///home/mystuff/java/MyDirGenerator.class"/>
  +        <map:generator type="xsp"    src="class:///org.apache.cocoon.generators.XSPGenerator">
  +         ...
  +        </map:generator>
  +       </map:generators>
  +      ]]>
  +     </source>
  +
  +     <p>
  +      The <code>default</code> attribute on <code>&lt;map:generators&gt;</code>
specifies the type 
  +      of generator to use if none is specified in a pipeline.
  +     </p>
  +   
  +    </s3>
  +   </s2>
     </s1>
   
     <s1 title="Interface specifications">
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +2 -2      xml-cocoon/xdocs/drafts/Attic/sitemap-working-draft.xmap
  
  Index: sitemap-working-draft.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/xdocs/drafts/Attic/sitemap-working-draft.xmap,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- sitemap-working-draft.xmap	2000/07/06 16:59:11	1.1.2.7
  +++ sitemap-working-draft.xmap	2000/07/11 23:47:03	1.1.2.8
  @@ -225,7 +225,7 @@
          depending on the matcher own logic (this is up to the matcher implementation).
      -->
     <map:matchers default="uri-wildcard">
  -   <map:matcher type="uri-wildcard" src="class:///org.apache.cocoon.matcher.WildcardURIMatcher">
  +   <map:matcher type="uri-wildcard" factory="org.apache.cocoon.matchers.WildcardURIMatcherFactory">
       ...
      </map:matcher>
   
  @@ -233,7 +233,7 @@
       ...
      </map:matcher>
   
  -   <map:matcher type="browser" src="class:///org.apache.cocoon.matcher.BrowserMatcher">
  +   <map:matcher type="browser" factory="org.apache.cocoon.matchers.BrowserMatcherFactory">
       ...
      </map:matcher>
     </map:matchers>
  
  
  

Mime
View raw message