You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2003/08/07 04:51:33 UTC

cvs commit: xml-forrest/src/resources/conf aggregate.xmap dtd.xmap faq.xmap forrest.xmap issues.xmap linkmap.xmap menu.xmap profiler.xmap raw.xmap resources.xmap revisions.xmap sitemap.xmap status.xmap

jefft       2003/08/06 19:51:33

  Modified:    src/resources/conf aggregate.xmap dtd.xmap faq.xmap
                        forrest.xmap issues.xmap linkmap.xmap menu.xmap
                        profiler.xmap raw.xmap resources.xmap
                        revisions.xmap sitemap.xmap status.xmap
  Log:
  Redefine components in subsitemaps, where they are used.  Putting them in the
  main sitemap makes upgrading almost impossible, as sitemap.xmap is frequently
  overridden, which locks in place an old set of components.
  
  Revision  Changes    Path
  1.8       +10 -0     xml-forrest/src/resources/conf/aggregate.xmap
  
  Index: aggregate.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/aggregate.xmap,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- aggregate.xmap	29 Jul 2003 09:45:19 -0000	1.7
  +++ aggregate.xmap	7 Aug 2003 02:51:33 -0000	1.8
  @@ -19,6 +19,16 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file"/>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt">
  +      <map:transformer name="cinclude" src="org.apache.cocoon.transformation.CIncludeTransformer"/>
  +    </map:transformers>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +  </map:components>
   
     <map:pipelines>
       <map:pipeline>
  
  
  
  1.8       +10 -0     xml-forrest/src/resources/conf/dtd.xmap
  
  Index: dtd.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/dtd.xmap,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- dtd.xmap	29 Jul 2003 09:45:19 -0000	1.7
  +++ dtd.xmap	7 Aug 2003 02:51:33 -0000	1.8
  @@ -12,6 +12,16 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file">
  +      <map:generator name="nekodtd" src="org.apache.cocoon.generation.XNIConfigurableFileGenerator" />
  +    </map:generators>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +  </map:components>
   
     <map:resources>
     </map:resources>
  
  
  
  1.17      +6 -2      xml-forrest/src/resources/conf/faq.xmap
  
  Index: faq.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/faq.xmap,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- faq.xmap	1 Aug 2003 11:42:13 -0000	1.16
  +++ faq.xmap	7 Aug 2003 02:51:33 -0000	1.17
  @@ -18,6 +18,11 @@
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  +    <map:generators default="file"/>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
       <map:actions>
         <map:action logger="sitemap.action.sourcetype" name="sourcetype" src="org.apache.cocoon.acting.sourcetype.SourceTypeAction">
           <sourcetype name="faq-v10">
  @@ -36,7 +41,6 @@
       </map:actions>
   
       <map:selectors default="browser">
  -    <!-- FIXME JJP: This should not be here. It should be define on sitemap -->
         <map:selector logger="sitemap.selector.parameter" name="parameter" src="org.apache.cocoon.selection.ParameterSelector" />
       </map:selectors>
     </map:components>
  
  
  
  1.26      +8 -2      xml-forrest/src/resources/conf/forrest.xmap
  
  Index: forrest.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/forrest.xmap,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- forrest.xmap	30 Jul 2003 16:35:46 -0000	1.25
  +++ forrest.xmap	7 Aug 2003 02:51:33 -0000	1.26
  @@ -20,12 +20,18 @@
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
     <!-- FIXME (JJP): This should not be here. Should be define on sitemap -->
  -    <map:generators default="file">
  +  <map:generators default="file">
  +
  +
         <map:generator name="html"      src="org.apache.cocoon.generation.HTMLGenerator">
           <jtidy-config>jtidy.properties</jtidy-config>
         </map:generator>
         <map:generator name="text2xml" src="org.apache.cocoon.generation.TextGenerator" />
       </map:generators>
  +    <map:serializers default="html"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +
       <map:transformers default="xslt">
         <map:transformer name="lexer" src="org.apache.cocoon.transformation.LexicalTransformer" logger="sitemap.transformer.lexer"/>
         <map:transformer name="parser" src="org.apache.cocoon.transformation.ParserTransformer" logger="sitemap.transformer.parser">
  
  
  
  1.7       +8 -0      xml-forrest/src/resources/conf/issues.xmap
  
  Index: issues.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/issues.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- issues.xmap	29 Jul 2003 09:45:19 -0000	1.6
  +++ issues.xmap	7 Aug 2003 02:51:33 -0000	1.7
  @@ -12,6 +12,14 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file"/>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +  </map:components>
   
     <map:resources>
     </map:resources>
  
  
  
  1.16      +8 -0      xml-forrest/src/resources/conf/linkmap.xmap
  
  Index: linkmap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/linkmap.xmap,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- linkmap.xmap	29 Jul 2003 09:45:19 -0000	1.15
  +++ linkmap.xmap	7 Aug 2003 02:51:33 -0000	1.16
  @@ -15,6 +15,14 @@
   
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file"/>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +  </map:components>
   
     <map:pipelines>
       <map:pipeline>
  
  
  
  1.8       +11 -0     xml-forrest/src/resources/conf/menu.xmap
  
  Index: menu.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/menu.xmap,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- menu.xmap	29 Jul 2003 09:45:19 -0000	1.7
  +++ menu.xmap	7 Aug 2003 02:51:33 -0000	1.8
  @@ -15,6 +15,17 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file"/>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser">
  +      <map:selector logger="sitemap.selector.config" name="config" src="org.apache.cocoon.selection.SimpleSelector" />
  +    </map:selectors>
  +
  +  </map:components>
   
     <map:pipelines>
   
  
  
  
  1.7       +10 -0     xml-forrest/src/resources/conf/profiler.xmap
  
  Index: profiler.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/profiler.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- profiler.xmap	29 Jul 2003 09:45:19 -0000	1.6
  +++ profiler.xmap	7 Aug 2003 02:51:33 -0000	1.7
  @@ -14,6 +14,16 @@
   
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file">
  +      <map:generator name="profiler" src="org.apache.cocoon.generation.ProfilerGenerator"/>
  +    </map:generators>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +  </map:components>
   
     <map:resources>
     </map:resources>
  
  
  
  1.9       +11 -0     xml-forrest/src/resources/conf/raw.xmap
  
  Index: raw.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/raw.xmap,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- raw.xmap	29 Jul 2003 09:45:19 -0000	1.8
  +++ raw.xmap	7 Aug 2003 02:51:33 -0000	1.9
  @@ -15,6 +15,17 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file">
  +      <map:generator name="html" src="org.apache.cocoon.generation.HTMLGenerator" />
  +    </map:generators>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:actions/>
  +    <map:selectors default="parameter"/>
  +  </map:components>
   
     <map:resources>
     </map:resources>
  
  
  
  1.4       +9 -1      xml-forrest/src/resources/conf/resources.xmap
  
  Index: resources.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/resources.xmap,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- resources.xmap	29 Jul 2003 09:45:19 -0000	1.3
  +++ resources.xmap	7 Aug 2003 02:51:33 -0000	1.4
  @@ -12,11 +12,19 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  -  <!-- FIXME (JJP): This should not be defined here. -->
     <map:components>
  +    <map:generators default="file"/>
       <map:serializers default="html">
  +      <map:serializer name="svg2jpeg" mime-type="image/jpeg" src="org.apache.cocoon.serialization.SVGSerializer">
  +        <parameter name="quality" type="float" value="1.0"/>
  +      </map:serializer>
         <map:serializer mime-type="image/png" name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer"/>
       </map:serializers>
  + 
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
     </map:components>
   
     <map:resources>
  
  
  
  1.9       +11 -2     xml-forrest/src/resources/conf/revisions.xmap
  
  Index: revisions.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/revisions.xmap,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- revisions.xmap	1 Aug 2003 11:42:13 -0000	1.8
  +++ revisions.xmap	7 Aug 2003 02:51:33 -0000	1.9
  @@ -22,7 +22,16 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  -  
  +  <map:components>
  +    <map:generators default="file">
  +      <map:generator name="directory" src="org.apache.cocoon.generation.DirectoryGenerator" />
  +    </map:generators>
  +    <map:serializers default="html"/>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +  </map:components>
     <map:resources>
     </map:resources>
   
  
  
  
  1.116     +4 -30     xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- sitemap.xmap	30 Jul 2003 16:35:46 -0000	1.115
  +++ sitemap.xmap	7 Aug 2003 02:51:33 -0000	1.116
  @@ -12,13 +12,12 @@
     <map:components>
       <map:generators default="file">
         <map:generator name="file"      src="org.apache.cocoon.generation.FileGenerator" />
  +      <!--
         <map:generator name="html"      src="org.apache.cocoon.generation.HTMLGenerator">
           <jtidy-config>jtidy.properties</jtidy-config>
         </map:generator>
         <map:generator name="directory" src="org.apache.cocoon.generation.DirectoryGenerator" />
  -      <map:generator name="text2xml"  src="org.apache.cocoon.generation.TextGenerator" />
  -      <map:generator name="profiler"  src="org.apache.cocoon.generation.ProfilerGenerator" />
  -      <map:generator name="nekodtd"   src="org.apache.cocoon.generation.XNIConfigurableFileGenerator" />
  +      -->
       </map:generators>
   
       <map:transformers default="xslt">
  @@ -51,7 +50,6 @@
         </map:transformer>
   
         <map:transformer name="xpath" logger="sitemap.transformer.xpath" src="org.apache.cocoon.transformation.XPathTransformer" />
  -
         <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer" logger="sitemap.transformer.xslt" pool-max="32" pool-min="8" pool-grow="2">
           <use-request-parameters>false</use-request-parameters>
           <use-browser-capabilities-db>false</use-browser-capabilities-db>
  @@ -62,16 +60,6 @@
         </map:transformer>
   
         <map:transformer name="xinclude" src="org.apache.cocoon.transformation.XIncludeTransformer" logger="sitemap.transformer.xinclude" pool-grow="2" pool-max="16" pool-min="2" />
  -
  -      <map:transformer name="lexer" src="org.apache.cocoon.transformation.LexicalTransformer" logger="sitemap.transformer.lexer"/>
  -
  -      <map:transformer name="parser" src="org.apache.cocoon.transformation.ParserTransformer" logger="sitemap.transformer.parser">
  -         <parameter name="flatten" value="true"/>
  -         <parameter name="ignoring" value="true"/>
  -      </map:transformer>
  -
  -      <map:transformer name="cinclude" src="org.apache.cocoon.transformation.CIncludeTransformer"/>
  -
       </map:transformers>
   
       <map:readers default="resource">
  @@ -97,18 +85,6 @@
         <map:serializer name="links" src="org.apache.cocoon.serialization.LinkSerializer">
           <encoding>ISO-8859-1</encoding>
         </map:serializer>
  -      <map:serializer name="svg2jpeg" mime-type="image/jpeg" src="org.apache.cocoon.serialization.SVGSerializer">
  -         <parameter name="quality" type="float" value="1.0"/>
  -      </map:serializer>
  -
  -      <map:serializer name="svg2png" mime-type="image/png" src="org.apache.cocoon.serialization.SVGSerializer" />
  -
  -      <map:serializer name="rss091" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer">
  -         <doctype-public>-//Netscape Communications//DTD RSS 0.91//EN</doctype-public>
  -         <doctype-system>http://my.netscape.com/publish/formats/rss-0.91.dtd</doctype-system>
  -         <encoding>ISO-8859-1</encoding>
  -      </map:serializer>
  -
        <!--
         <map:serializer mime-type="application/x-shockwave-flash" name="swf" src="org.apache.cocoon.serialization.SWFSerializer"/>
         <map:serializer mime-type="application/msword" name="fo2rtf" src="org.apache.cocoon.serialization.RTFSerializer"/>
  @@ -121,9 +97,7 @@
       </map:matchers>
   
       <map:selectors>
  -      <map:selector name="exists" logger="sitemap.selector.exists" src="org.apache.cocoon.selection.ResourceExistsSelector" />
  -      <map:selector name="config" logger="sitemap.selector.config" src="org.apache.cocoon.selection.SimpleSelector" />
  -      <map:selector name="parameter" logger="sitemap.selector.parameter" src="org.apache.cocoon.selection.ParameterSelector" />
  +      <map:selector logger="sitemap.selector.exists" name="exists" src="org.apache.cocoon.selection.ResourceExistsSelector" />
       </map:selectors>
   
       <map:pipes default="caching">
  
  
  
  1.8       +15 -1     xml-forrest/src/resources/conf/status.xmap
  
  Index: status.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/status.xmap,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- status.xmap	1 Aug 2003 11:42:13 -0000	1.7
  +++ status.xmap	7 Aug 2003 02:51:33 -0000	1.8
  @@ -15,6 +15,20 @@
   ==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +  <map:components>
  +    <map:generators default="file"/>
  +    <map:serializers default="html">
  +      <map:serializer name="rss091" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer">
  +        <doctype-public>-//Netscape Communications//DTD RSS 0.91//EN</doctype-public>
  +        <doctype-system>http://my.netscape.com/publish/formats/rss-0.91.dtd</doctype-system>
  +        <encoding>ISO-8859-1</encoding>
  +      </map:serializer>
  +    </map:serializers>
  +    <map:transformers default="xslt"/>
  +    <map:readers default="resource"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +  </map:components>
   
     <map:resources>
     </map:resources>
  
  
  

Re: Where to put components (Re: cvs commit: ...)

Posted by Jeff Turner <je...@apache.org>.
On Thu, Aug 07, 2003 at 04:34:28PM +0200, Juan Jose Pablos wrote:
> Jeff,
> 
> I removed the componets that are not related to submaps. But I would 
> like to remove the ones that does not declaring anything, to give you an 
> example on status.xml, I would like to remove:
> 
> 19d18
> <     <map:generators default="file"/>
> 27,29d25
> <     <map:transformers default="xslt"/>
> <     <map:matchers default="wildcard"/>
> <     <map:selectors default="browser"/>
> 
> 
> You said that they there because  "They act as documentation, and make 
> the subsitemap's interface with the owner sitemap explicit."
> 
> 
> 1) If we want to have as documentation, then we can have them under <!-- 
> comments -->
>
> I removed and test it, and I can not see any change on the behaviour.
> 
> Could you elaborate a bit futher on "make an explicit interface?"?

What does the following subsitemap do?

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:pipelines>
    <map:pipeline>
      <map:match pattern="aaa"/>
      <map:generate src="bbb"/>
      <map:transform src="ccc"/>
      <map:serialize/>
    </map:pipeline>
  </map:pipelines>
</map:sitemap>

There is no way to tell, because it depends on what the parent sitemap
has declared as the defaults.

If you add:

<map:components>
  <map:generators default="serverpages"/>
  <map:transformers default="xslt"/>
  <map:serializers default="fo2pdf"/>
</map:components>

Then

- You immediately know that 'aaa' is a PDF, 'bbb' is an XSP, and 'ccc'
  is an XSLT stylesheet.  This is the documentation effect

- Say some day we decide to switch the default transformer from XSLT
  to STX.  If we handn't explicitly said "ccc is an XSLT" then this
  sitemap would quietly fail.  But as we've defined it, the sitemap
  will work fine if we keep the 'xslt' component, and fail in a
  sensible manner if we don't.


--Jeff


> Cheers,
> Cheche
> 
> 
> 

Re: Where to put components (Re: cvs commit: ...)

Posted by Juan Jose Pablos <ch...@che-che.com>.
Jeff,

I removed the componets that are not related to submaps. But I would 
like to remove the ones that does not declaring anything, to give you an 
example on status.xml, I would like to remove:

19d18
<     <map:generators default="file"/>
27,29d25
<     <map:transformers default="xslt"/>
<     <map:matchers default="wildcard"/>
<     <map:selectors default="browser"/>


You said that they there because  "They act as documentation, and make 
the subsitemap's interface with the owner sitemap explicit."


1) If we want to have as documentation, then we can have them under <!-- 
comments -->


I removed and test it, and I can not see any change on the behaviour.

Could you elaborate a bit futher on "make an explicit interface?"?

Cheers,
Cheche




Re: Where to put components (Re: cvs commit: ...)

Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola,

Nicola Ken Barozzi wrote:
> 
> 
> Now, that is not the same thing as now, because we don't want or need a 
> generic include mechanism, but a way of *decorating* our sitemap.
> 
*decorating*???

> 
> Let's talk about what we intend to see before discussing implementation.
> 

Wherever is the discussion, I would like to see some examples, it is 
easier to understant each other.

Cheers,
Cheche




Re: Where to put components (Re: cvs commit: ...)

Posted by Roger Ackroyd <ap...@ackroyd.freeserve.co.uk>.
----- Original Message -----
From: "Nicola Ken Barozzi" <ni...@apache.org>
To: <fo...@xml.apache.org>
Sent: Thursday, August 07, 2003 2:02 PM
Subject: Re: Where to put components (Re: cvs commit: ...)

> Another need is that to define the sources of the files, that are not
> necessarily on the disk.
>
Is that not a core concept of Maven?. The idea of known local and remote
repositories does not seem a too bad an idea. Can this not be extended to
forrest for all types of files?
Am I being naive?
Roger


Re: Where to put components (Re: cvs commit: ...)

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Jeff Turner wrote, On 07/08/2003 14.56:

> On Thu, Aug 07, 2003 at 02:24:53PM +0200, Juan Jose Pablos wrote:
...
>>The root problem is the way we overwrite sitemap, and the need for users 
>>to overwrite it.
> 
> Yes.

Another need is that to define the sources of the files, that are not 
necessarily on the disk.

> No idea how to fix this though..?

I still remember a guy that asked to be able to "include" sitemap parts, 
because he had different teams working together on the sitemap.

I replied to him that he had to partition the URI space to make it 
possible that these teams work on separated spaces. It makes sense, as 
they do not need to step on each other just because they defined the 
same URI.

Now, that is not the same thing as now, because we don't want or need a 
generic include mechanism, but a way of *decorating* our sitemap.

> Maybe the solution is outside Forrest.  Perhaps we could write a SAX
> handler that constructs a 'virtual' sitemap by reading the Forrest
> default sitemap, and then adding user-defined parts..

Let's talk about what we intend to see before discussing implementation.

I imagine that we define some "extension" points in the sitemap where we 
reckon that users should be able to add definitions, or even override 
behaviour. Since we won't change these points, changing sitemaps would 
not change the users ones.

How would users use it in practice? Hmmm... I'd want to override a match 
for instance, and in case pass it on. I'd also like to be able to insert 
extra components in the pipeline, like for example a pre-skinning 
transformer, *without* messing with the Forrest-defined pipeline.

Hmmm...

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



Re: Where to put components (Re: cvs commit: ...)

Posted by Jeff Turner <je...@apache.org>.
On Thu, Aug 07, 2003 at 02:24:53PM +0200, Juan Jose Pablos wrote:
> Jeff,
> 
> Jeff Turner wrote:
> >
> >status.xmap does not use any readers, selectors or resources, so why
> >should it declare a dependency on any, or define any?
> >
> 
> That is what I am asking you!, on your last change, you added more
> stuff than what I think is needed.

Oh, sorry, I was looking at an old copy (the one you committed), thinking
"what's wrong with that?" ;)

I'll fix this tomorrow unless you get to it first.

> >status.xmap does use generators, transformers and serializers, so there
> >should probably be 
> >
> ><map:components>
> >  <map:generators default="file"/>
> >  <map:transformers default="xslt"/>
> >  <map:serializer type="html"/>
> ><//map:components>
> >
> >
> 
> But on the last commit you added as well:
> 
> >     <map:readers default="resource"/>
> >     <map:selectors default="browser"/>
> 
> and there are a:
> 
>   <map:resources>
>   </map:resources>
> 
> If there should not be there, let me know and I will removed them.

Yes you're right, they shouldn't be there.  Sorry, seems I rolled back a
bunch of useful changes from your commit.

> >I'm not following.  If I see
> >
> >  <map:transformers default="xslt"/>
> >
> >I know that this subsitemap expects 'xslt' to be defined for it.  Why
> >would I redefine it?  If I wanted to, what's wrong with that?
> >
> 
> There is nothing wrong with define another transformer, but it is wrong 
> if you are going to define the same transformer ( as it happends) 
> because that is duplication.

It's not _defining_ a transformer at all.  It's _declaring_ that this
sitemap expects the default transformer to be 'xslt'.  The 'xslt'
transformer is defined in the root sitemap.

> Belive or not, this code produces confusion, it you want to leave as 
> documentation then let's use <!-- coments -->. I do not like code that 
> does not anything but confuse :-)
> 
> 
> >
> >Yes I see that.  For example, if we defined the HTML generator only in
> >raw.xmap, and then later moved it to sitemap.xmap, we'd break things.
> >However, we could always leave a duplicate definition in raw.xmap.  The
> >other way round (moving from sitemap.xmap to a subsitemap) always breaks
> >things.  It is still better to start with a limited scope, and then
> >expand it if necessary.
> >
> 
> The root problem is the way we overwrite sitemap, and the need for users 
> to overwrite it.

Yes.

No idea how to fix this though..?

Maybe the solution is outside Forrest.  Perhaps we could write a SAX
handler that constructs a 'virtual' sitemap by reading the Forrest
default sitemap, and then adding user-defined parts..

> Can we have an external xml file with all definitions?

Not as far as I know.


--Jeff

> 
> Cheers,
> Cheche
> 

Re: Where to put components (Re: cvs commit: ...)

Posted by Juan Jose Pablos <ch...@che-che.com>.
Jeff,

Jeff Turner wrote:
> 
> status.xmap does not use any readers, selectors or resources, so why
> should it declare a dependency on any, or define any?
> 

That is what I am asking you!, on your last change, you added more stuff 
  than what I think is needed.

> status.xmap does use generators, transformers and serializers, so there
> should probably be 
> 
> <map:components>
>   <map:generators default="file"/>
>   <map:transformers default="xslt"/>
>   <map:serializer type="html"/>
> <//map:components>
> 
> 

But on the last commit you added as well:

 >     <map:readers default="resource"/>
 >     <map:selectors default="browser"/>

and there are a:

   <map:resources>
   </map:resources>

If there should not be there, let me know and I will removed them.


> I'm not following.  If I see
> 
>   <map:transformers default="xslt"/>
> 
> I know that this subsitemap expects 'xslt' to be defined for it.  Why
> would I redefine it?  If I wanted to, what's wrong with that?
> 

There is nothing wrong with define another transformer, but it is wrong 
if you are going to define the same transformer ( as it happends) 
because that is duplication.

Belive or not, this code produces confusion, it you want to leave as 
documentation then let's use <!-- coments -->. I do not like code that 
does not anything but confuse :-)


> 
> Yes I see that.  For example, if we defined the HTML generator only in
> raw.xmap, and then later moved it to sitemap.xmap, we'd break things.
> However, we could always leave a duplicate definition in raw.xmap.  The
> other way round (moving from sitemap.xmap to a subsitemap) always breaks
> things.  It is still better to start with a limited scope, and then
> expand it if necessary.
> 

The root problem is the way we overwrite sitemap, and the need for users 
to overwrite it.

Can we have an external xml file with all definitions?

Cheers,
Cheche


Where to put components (Re: cvs commit: ...)

Posted by Jeff Turner <je...@apache.org>.
On Thu, Aug 07, 2003 at 12:47:24PM +0200, Juan Jose Pablos wrote:
> jeff,
> 
> >>
> >>They do nothing.
> >
> >
> >They act as documentation, and make the subsitemap's interface with the
> >owner sitemap explicit.  It's like declaring your dependencies; always a
> >good thing.
> 
> IMO it is confused, for status there is not map:readers map:selectors or 
> map:resources but you have those entries there.

status.xmap does not use any readers, selectors or resources, so why
should it declare a dependency on any, or define any?

status.xmap does use generators, transformers and serializers, so there
should probably be 

<map:components>
  <map:generators default="file"/>
  <map:transformers default="xslt"/>
  <map:serializer type="html"/>
<//map:components>


> > Also, when next someone wants to add a transformer, they can
> >immediately see where to add the component definition, and don't risk
> >incorrectly redefining the default.
> >
> 
> But if they want to define the same one, they will try to duplicate as 
> it happens (this was how started)

I'm not following.  If I see

  <map:transformers default="xslt"/>

I know that this subsitemap expects 'xslt' to be defined for it.  Why
would I redefine it?  If I wanted to, what's wrong with that?

> >Because you are right that duplication is not a good thing.  This is a
> >tradeoff.  Some components ('xml', 'xslt', 'html' etc) are used
> >everywhere, and their definition is typically very stable.  If a
> >component is a) used in multiple places, b) has a stable component
> >definition, then it should go in sitemap.xmap.
> >
> ok,
> so why forrest.xmap and raw.xmap still defining html generators, can see 
> my point about getting things tidier?

Yes, there is room for improvement.  Since only raw.xmap uses the HTML
generator, it should probably only be defined there.

> when a component definition is move it to sitemap.xmap then users that
> overwrite sitemap will get its site broken, because of that I thought
> that if you put it on sitemap in the first place less you play safe.

Yes I see that.  For example, if we defined the HTML generator only in
raw.xmap, and then later moved it to sitemap.xmap, we'd break things.
However, we could always leave a duplicate definition in raw.xmap.  The
other way round (moving from sitemap.xmap to a subsitemap) always breaks
things.  It is still better to start with a limited scope, and then
expand it if necessary.


--Jeff


> Cheers,
> cheche
> 
> 
> 

Re: cvs commit: xml-forrest/src/resources/conf aggregate.xmap dtd.xmap faq.xmap forrest.xmap issues.xmap linkmap.xmap menu.xmap profiler.xmap raw.xmap resources.xmap revisions.xmap sitemap.xmap status.xmap

Posted by Juan Jose Pablos <ch...@che-che.com>.
jeff,

>>
>>They do nothing.
> 
> 
> They act as documentation, and make the subsitemap's interface with the
> owner sitemap explicit.  It's like declaring your dependencies; always a
> good thing.

IMO it is confused, for status there is not map:readers map:selectors or 
map:resources but you have those entries there.

>  Also, when next someone wants to add a transformer, they can
> immediately see where to add the component definition, and don't risk
> incorrectly redefining the default.
> 

But if they want to define the same one, they will try to duplicate as 
it happens (this was how started)


> Because you are right that duplication is not a good thing.  This is a
> tradeoff.  Some components ('xml', 'xslt', 'html' etc) are used
> everywhere, and their definition is typically very stable.  If a
> component is a) used in multiple places, b) has a stable component
> definition, then it should go in sitemap.xmap.
> 
ok,
so why forrest.xmap and raw.xmap still defining html generators, can see 
my point about getting things tidier?

when a component definition is move it to sitemap.xmap then users that 
overwrite sitemap will get its site broken, because of that I thought 
that if you put it on sitemap in the first place less you play safe.

Cheers,
cheche




Re: cvs commit: xml-forrest/src/resources/conf aggregate.xmap dtd.xmap faq.xmap forrest.xmap issues.xmap linkmap.xmap menu.xmap profiler.xmap raw.xmap resources.xmap revisions.xmap sitemap.xmap status.xmap

Posted by Jeff Turner <je...@apache.org>.
On Thu, Aug 07, 2003 at 11:17:34AM +0200, Juan Jose Pablos wrote:
> Jeff,
> 
> Why do we have this?:
> 
> 
>     <map:transformers default="xslt"/>
>     <map:readers default="resource"/>
>     <map:matchers default="wildcard"/>
>     <map:selectors default="browser"/>
>   </map:components>
> 
>   <map:resources>
>   </map:resources>
> 
> They do nothing.

They act as documentation, and make the subsitemap's interface with the
owner sitemap explicit.  It's like declaring your dependencies; always a
good thing.  Also, when next someone wants to add a transformer, they can
immediately see where to add the component definition, and don't risk
incorrectly redefining the default.

> I thought that we where going to move all the map:components to the 
> submaps, to ensure that there is not references. Why they still some on 
> sitemap?

Because you are right that duplication is not a good thing.  This is a
tradeoff.  Some components ('xml', 'xslt', 'html' etc) are used
everywhere, and their definition is typically very stable.  If a
component is a) used in multiple places, b) has a stable component
definition, then it should go in sitemap.xmap.


> I got the feeling that we are in square one.

Square one was a good square ;P

> When you have this on a submap:
> 
> <map:generate type="file" src="...."/>  It will get the definition from 
> sitemap, so you have a reference.
> 
> To avoid this you need to define all the coomponents on the submap, I 
> attached a patch on status so you can see what It the result.

There are two extremes:

1. Subsitemaps redeclare their components:

  Advantage    : makes them very independent and reusable
  Disadvantage : *lots* of duplicate definitions

2. sitemap.xmap declares all components:

  Advantage    : 100% reuse, only need modify a component in one place
  Disadvantage : makes it impossible to override sitemap.xmap

'Square one' is the compromise between these extremes.  We put common,
stable component definitions in sitemap.xmap, and put all others closest
to where they are used, in the subsitemaps.


--Jeff


> 
> Cheers,
> Cheche
> 


Re: cvs commit: xml-forrest/src/resources/conf aggregate.xmap dtd.xmap faq.xmap forrest.xmap issues.xmap linkmap.xmap menu.xmap profiler.xmap raw.xmap resources.xmap revisions.xmap sitemap.xmap status.xmap

Posted by Juan Jose Pablos <ch...@che-che.com>.
Jeff,

Why do we have this?:


     <map:transformers default="xslt"/>
     <map:readers default="resource"/>
     <map:matchers default="wildcard"/>
     <map:selectors default="browser"/>
   </map:components>

   <map:resources>
   </map:resources>

They do nothing.

I thought that we where going to move all the map:components to the 
submaps, to ensure that there is not references. Why they still some on 
sitemap? I got the feeling that we are in square one.

When you have this on a submap:

<map:generate type="file" src="...."/>  It will get the definition from 
sitemap, so you have a reference.

To avoid this you need to define all the coomponents on the submap, I 
attached a patch on status so you can see what It the result.

Cheers,
Cheche



jefft@apache.org wrote:
> jefft       2003/08/06 19:51:33
> 
>   Modified:    src/resources/conf aggregate.xmap dtd.xmap faq.xmap
>                         forrest.xmap issues.xmap linkmap.xmap menu.xmap
>                         profiler.xmap raw.xmap resources.xmap
>                         revisions.xmap sitemap.xmap status.xmap
>   Log:
>   Redefine components in subsitemaps, where they are used.  Putting them in the
>   main sitemap makes upgrading almost impossible, as sitemap.xmap is frequently
>   overridden, which locks in place an old set of components.
>