forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Williams <twilli...@apache.org>
Subject Re: svn commit: r240091 - in /forrest/trunk/main/webapp: forrest.xmap sitemap.xmap
Date Thu, 25 Aug 2005 16:42:03 GMT
Sorry, I should have put my opinion in while I had the opportunity in
your other thread on this.  I think that moving some of these is good,
but not all.  For example, the extparser transformer doesn't seem to
be used elsewhere so it makes sense to me to only have it defined in
forrest.xmap.  That way, if the requirement for it in forrest.xmap
goes away we can confidently remove it from there.  Otherwise, we
won't easily know if theres dependencies elsewhere on it so it would
sit forever.  It follows the "define it as close to first use" idea.

When I was first learning this sitemap stuff and brought the need for
refactoring some time ago, I looked at creating a stylesheet that
would analyze our sitemap space (minus project/plugins) to determine
what's being used where.  I didn't get very far as my XSLT skills
aren't great.  Here's a sample of what the output for the Transformers
looks like.  It might be worth dusting that off and completing it
before we do the sitemap refactoring.  These are where they are
defined, we'd obviously want to go further than that into where
they're used.  I wish I had time to further turn this into an SVG
representation too;)
--tim

Transformers
    * cinclude - { aggregate.xmap, sitemap.xmap, }
    * extparser - { forrest.xmap, }
    * i18n - { i18n.xmap, menu.xmap, tabs.xmap, }
    * idgen - { sitemap.xmap, }
    * index - { search.xmap, }
    * lexer - { forrest.xmap, sitemap.xmap, }
    * linkrewriter - { sitemap.xmap, }
    * parser - { forrest.xmap, sitemap.xmap, }
    * pattern - { forrest.xmap, resources.xmap, sitemap.xmap, }
    * skinconf - { sitemap.xmap, }
    * xinclude - { sitemap.xmap, }
    * xpath - { sitemap.xmap, }
    * xslt - { sitemap.xmap, }
    * xsltc - { sitemap.xmap, }
    * xslt-saxon - { sitemap.xmap, }




On 8/25/05, ferdinand@apache.org <ferdinand@apache.org> wrote:
> Author: ferdinand
> Date: Thu Aug 25 08:34:50 2005
> New Revision: 240091
> 
> URL: http://svn.apache.org/viewcvs?rev=240091&view=rev
> Log:
> Moved common components from forrest.xmpa to sitemap.xmap as suggested by the fixme
> 
> Modified:
>     forrest/trunk/main/webapp/forrest.xmap
>     forrest/trunk/main/webapp/sitemap.xmap
> 
> Modified: forrest/trunk/main/webapp/forrest.xmap
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/forrest.xmap?rev=240091&r1=240090&r2=240091&view=diff
> ==============================================================================
> --- forrest/trunk/main/webapp/forrest.xmap (original)
> +++ forrest/trunk/main/webapp/forrest.xmap Thu Aug 25 08:34:50 2005
> @@ -37,55 +37,6 @@
> 
>  <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:generator name="html"      src="org.apache.cocoon.generation.HTMLGenerator">
> -        <jtidy-config>WEB-INF/jtidy.properties</jtidy-config>
> -      </map:generator>
> -      <map:generator name="text2xml" logger="sitemap.generator.textgenerator"
> -                     src="org.apache.cocoon.generation.TextGenerator">
> -       <parameter name="localizable" value="true"/>
> -      </map:generator>
> -      <map:generator name="exception"
> -                  src="org.apache.cocoon.generation.ParseExceptionGenerator"/>
> -
> -    </map:generators>
> -    <map:serializers default="html"/>
> -    <map:matchers default="wildcard">
> -    <map:matcher name="i18n" src="org.apache.cocoon.matching.LocaleMatcher">
> -    <negotiate>true</negotiate>
> -    <use-locales>false</use-locales>
> -    <use-blank-locale>true</use-blank-locale>
> -    <default-locale language="en" country="US"/>
> -    </map:matcher>
> -    </map:matchers>
> -
> -
> -    <map:transformers default="xslt">
> -          <map:transformer name="pattern"
> -                           src="org.apache.cocoon.transformation.PatternTransformer"
> -                           logger="sitemap.transformer.pattern">
> -           <parameter name="groups" value="true"/>
> -          </map:transformer>
> -          <map:transformer name="lexer"
> -                           src="org.apache.cocoon.transformation.LexicalTransformer"
> -                           logger="sitemap.transformer.lexer">
> -           <parameter name="localizable" value="true"/>
> -          </map:transformer>
> -          <map:transformer name="parser"
> -                           src="org.apache.cocoon.transformation.ParserTransformer"
> -                           logger="sitemap.transformer.parser">
> -           <parameter name="flatten" value="true"/>
> -           <parameter name="recovery" value="true"/>
> -           <parameter name="localizable" value="true"/>
> -          </map:transformer>
> -
> -          <map:transformer name="extparser"
> -                           src="org.apache.cocoon.transformation.ExtendedParserTransformer"
> -                           logger="sitemap.transformer.extendedparser">
> -          </map:transformer>
> -    </map:transformers>
> -
>      <map:actions>
>        <map:action logger="sitemap.action.sourcetype" name="sourcetype" src="org.apache.forrest.sourcetype.SourceTypeAction">
>          <sourcetype name="document-v10">
> 
> Modified: forrest/trunk/main/webapp/sitemap.xmap
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/sitemap.xmap?rev=240091&r1=240090&r2=240091&view=diff
> ==============================================================================
> --- forrest/trunk/main/webapp/sitemap.xmap (original)
> +++ forrest/trunk/main/webapp/sitemap.xmap Thu Aug 25 08:34:50 2005
> @@ -23,29 +23,24 @@
>  $Revision: 1.12 $
>  ==================================================== -->
> 
> -
>  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>    <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">
> +      <map:generator name="file"  src="org.apache.cocoon.generation.FileGenerator"
/>
> +      <map:generator name="html"  src="org.apache.cocoon.generation.HTMLGenerator">
>          <jtidy-config>WEB-INF/jtidy.properties</jtidy-config>
>        </map:generator>
> +
>        <map:generator name="exception"
>                    src="org.apache.cocoon.generation.ParseExceptionGenerator"/>
> -      <!--
> -      <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="notifier" src="org.apache.cocoon.sitemap.NotifyingGenerator"
/>
> 
>        <map:generator name="text2xml" logger="sitemap.generator.textgenerator"
>                       src="org.apache.cocoon.generation.TextGenerator">
>         <parameter name="localizable" value="true"/>
>        </map:generator>
> +
>      </map:generators>
> 
>      <map:transformers default="xslt">
> @@ -112,16 +107,24 @@
>        <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="cinclude" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.CIncludeTransformer"
logger="sitemap.transformer.cinclude"/>
> -   <map:transformer name="pattern"
> -                    src="org.apache.cocoon.transformation.PatternTransformer"
> -                    logger="sitemap.transformer.pattern">
> -    <parameter name="groups" value="true"/>
> -   </map:transformer>
> +
> +     <map:transformer name="pattern"
> +       src="org.apache.cocoon.transformation.PatternTransformer"
> +       logger="sitemap.transformer.pattern">
> +       <parameter name="groups" value="true"/>
> +     </map:transformer>
> +
> +      <map:transformer name="extparser"
> +        src="org.apache.cocoon.transformation.ExtendedParserTransformer"
> +        logger="sitemap.transformer.extendedparser">
> +      </map:transformer>
> +
>     <map:transformer name="lexer"
>                      src="org.apache.cocoon.transformation.LexicalTransformer"
>                      logger="sitemap.transformer.lexer">
>      <parameter name="localizable" value="true"/>
>     </map:transformer>
> +
>     <map:transformer name="parser"
>                      src="org.apache.cocoon.transformation.ParserTransformer"
>                      logger="sitemap.transformer.parser">
> @@ -129,6 +132,10 @@
>      <parameter name="recovery" value="true"/>
>      <parameter name="localizable" value="true"/>
>     </map:transformer>
> +
> +
> +
> +
>     <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
>      <catalogues default="common">
>        <catalogue id="common" name="CommonMessages" location="skins/common/translations"/>
> @@ -177,6 +184,12 @@
>      <map:matchers default="wildcard">
>        <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
>        <map:matcher name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/>
> +      <map:matcher name="i18n" src="org.apache.cocoon.matching.LocaleMatcher">
> +        <negotiate>true</negotiate>
> +        <use-locales>false</use-locales>
> +        <use-blank-locale>true</use-blank-locale>
> +        <default-locale language="en" country="US"/>
> +      </map:matcher>
>      </map:matchers>
> 
>      <map:selectors>
> 
> 
>

Mime
View raw message