Return-Path: Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 90518 invoked by uid 1041); 11 Jul 2000 23:47:05 -0000 Date: 11 Jul 2000 23:47:05 -0000 Message-ID: <20000711234705.90517.qmail@locus.apache.org> From: giacomo@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/xdocs/drafts sitemap-working-draft.xmap 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 @@ - + 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 @@ - + @@ -55,21 +55,21 @@ - - - - + + + + - - - - + + + + - - - - - + + + + + @@ -78,9 +78,9 @@ - + - + @@ -88,9 +88,9 @@ - + - + @@ -98,9 +98,9 @@ - + - + @@ -108,9 +108,9 @@ - + - + @@ -118,9 +118,9 @@ - + - + @@ -128,9 +128,9 @@ - + - + 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 Pierpaolo Fumagalli * (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 map + + @@ -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 <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a> - * @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 extends AbstractSitemapProcessor { @@ -64,13 +71,13 @@ /** The matchers */ - + private Matcher matcher_ = null; - /** The choosers */ - - private Chooser chooser_ = null; + /** The selectors */ + + private Selector selector_ = null; /** The sub sitemaps */ @@ -78,6 +85,36 @@ SitemapProcessor sitemap_ = null; + /** The generated matchers */ + + + + true + + + + private Map _matcher_ (Request request) { + ; + } + + + + /** The generated selectors */ + + + + true + + + + private boolean _selector_ (Request request) { + + } + + + /** * Pass a <code>Configuration</code> instance to this * <code>Configurable</code> class. @@ -118,12 +155,12 @@ select="/map:sitemap/map:components/map:matchers/map:matcher"/> - /* Configure choosers */ + /* Configure selectors */ - chooser - Chooser + selector + Selector + select="/map:sitemap/map:components/map:selectors/map:selector"/> /* Configure mounted sitemaps */ @@ -195,11 +232,11 @@ } - - + + type - + @@ -209,7 +246,7 @@ true - if (chooser_.choose ("", request)) { + if (selector_.select ("", request)) { } @@ -219,7 +256,7 @@ } - + 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 ServerPagesGenerator classes * * @author Ricardo Rocha - * @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 Pierpaolo Fumagalli * (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 Giacomo Pati - * @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 @@ + 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 @@

+ + +

+ The <resource> 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 +

+ +

+ <xinclude:include href="#xpointer(resource[@name='Access refused'])"/> +

+ +

+ 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. +

+ + + + ]]> + + --> + + + + + + + + + + + +

+ All components have some common attributes. The list below will show and explain them: +

+ +
+
type
+
The type attribute gives the component a reference which can be used to point to them in the pipeline section.
+
src
+
Specifies where Cocoon finds the class representing this component. Note that the content of + the src attribute must be specified as an URI. +
+
+ +

+ The following protocols can be specified for all URI aware attributes: +

+
    +
  • file:
  • +
  • class:
  • +
  • jar:
  • +
  • http:
  • +
+
+ + +

+ 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 + <compile-stylesheet> parameters to a component: +

+ + + + + + + + ]]> + + + + The syntax

+ <xxx map:value="yyy">

+ is completely equivalent to

+ <xxx>yyy</xxx>

+ throughout the entire sitemap.. the "value" attribute is a reserved one. +
+ +

+ There is no given set of predefined parameters. +

+
+ + +

+ Generators generate XML content as SAX events and initialize the + pipeline processing. +

+ + + + + + + ... + + + ]]> + + +

+ The default attribute on <map:generators> specifies the type + of generator to use if none is specified in a pipeline. +

+ +
+
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). --> - + ... @@ -233,7 +233,7 @@ ... - + ...