lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject cvs commit: cocoon-lenya/src/webapp/lenya info.xmap
Date Fri, 29 Aug 2003 12:22:11 GMT
egli        2003/08/29 05:22:10

  Modified:    src/webapp/lenya info.xmap
  Log:
  Simplified the sitemap by introducing a resource which shares some
  common functionality.
  
  Revision  Changes    Path
  1.31      +62 -79    cocoon-lenya/src/webapp/lenya/info.xmap
  
  Index: info.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/info.xmap,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- info.xmap	29 Aug 2003 09:27:56 -0000	1.30
  +++ info.xmap	29 Aug 2003 12:22:10 -0000	1.31
  @@ -8,24 +8,43 @@
       <map:readers default="resource"/>
       <map:serializers default="html"/>
       <map:matchers default="wildcard">
  -       <map:matcher name="language" logger="sitemap.matcher.wildcardrequestparameter"
src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
  -          <parameter-name>lenya.language</parameter-name>
  -       </map:matcher>
  -       <map:matcher name="tab" logger="sitemap.matcher.wildcardrequestparameter" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
  -          <parameter-name>lenya.info-tab</parameter-name>
  -       </map:matcher>
  +      <map:matcher name="language" logger="sitemap.matcher.wildcardrequestparameter"
src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
  +        <parameter-name>lenya.language</parameter-name>
  +      </map:matcher>
  +      <map:matcher name="tab" logger="sitemap.matcher.wildcardrequestparameter" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
  +        <parameter-name>lenya.info-tab</parameter-name>
  +      </map:matcher>
       </map:matchers>
       <map:actions/>
       <map:selectors/>
     </map:components>
     
     <map:resources>
  +
       <map:resource name="style-cms-page">
         <map:transform src="xslt/util/page2xhtml.xsl">
           <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
         </map:transform>
         <map:serialize/>
       </map:resource>
  +
  +    <map:resource name="aggregate-and-transform-tab">
  +      <map:aggregate element="lenya" label="aggregate">
  +        <map:part src="cocoon:/menus/info.xml"/>
  +        <map:part element="cmsbody" type="serverpages" src="content/info/overview.xsp"/>
  +      </map:aggregate>
  +      <map:transform src="xslt/info/root.xsl" label="content">
  +        <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
  +        <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
  +        <map:parameter name="area" value="{page-envelope:area}"/>
  +        <map:parameter name="tab" value="{tab}"/>
  +        <map:parameter name="chosenlanguage" value="{chosenlanguage}"/>
  +        <map:parameter name="documentid" value="{documentid}"/>
  +        <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
  +      </map:transform>
  +      <map:serialize/>
  +    </map:resource>
  +
     </map:resources>
   
     <map:pipelines>
  @@ -40,131 +59,95 @@
       <!-- Menus -->
       <map:pipeline>
         <map:match pattern="menus/info.xml">
  -	    <map:generate type="serverpages" src="content/menus/info.xsp"/>
  -	    <map:serialize type="xml"/>
  +        <map:generate type="serverpages" src="content/menus/info.xsp"/>
  +        <map:serialize type="xml"/>
         </map:match>
       </map:pipeline>
   
       <!-- Sitetree Javascript array -->
       <map:pipeline>
         <map:match pattern="**lenyasitetree/*">
  -         <map:aggregate element="lenya" label="aggregate">
  +        <map:aggregate element="lenya" label="aggregate">
             <map:part src="pubs/{page-envelope:publication-id}/content/authoring/sitetree.xml"/>
             <map:part src="pubs/{page-envelope:publication-id}/content/archive/sitetree.xml"/>
             <map:part src="pubs/{page-envelope:publication-id}/content/trash/sitetree.xml"/>
           </map:aggregate>
  -	    <map:transform src="xslt/navigation/sitetree2nav.xsl" label="navtree">
  -	       <map:parameter name="chosenlanguage" value="{2}"/>
  -           <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>

  +        <map:transform src="xslt/navigation/sitetree2nav.xsl" label="navtree">
  +          <map:parameter name="chosenlanguage" value="{2}"/>
  +          <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>

           </map:transform>
  -	    <map:transform src="xslt/info/sitetree2tree.xsl" label="content">
  -           <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
  -           <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
  -           <map:parameter name="area" value="{page-envelope:area}"/>
  -           <map:parameter name="chosenlanguage" value="{2}"/>
  -           <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>

  +        <map:transform src="xslt/info/sitetree2tree.xsl" label="content">
  +          <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
  +          <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
  +          <map:parameter name="area" value="{page-envelope:area}"/>
  +          <map:parameter name="chosenlanguage" value="{2}"/>
  +          <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>

           </map:transform>
  -	    <map:serialize type="text"/>
  +        <map:serialize type="text"/>
         </map:match>
       </map:pipeline>
  -        
  -        <!-- Sitetree Javascript array      -->
  +    
  +    <!-- Sitetree Javascript array      -->
       <map:pipeline>
         <map:match pattern="**tree.js">
  -	    <map:read src="resources/javascript/tree.js"/>
  -	    <map:serialize type="text"/>
  +        <map:read src="resources/javascript/tree.js"/>
  +        <map:serialize type="text"/>
         </map:match>
       </map:pipeline>
   
  -        <!-- Sitetree Javascript array      -->
  +    <!-- Sitetree Javascript array      -->
       <map:pipeline>
         <map:match pattern="**ua.js">
  -	    <map:read src="resources/javascript/ua.js"/>
  -	    <map:serialize type="text"/>
  +        <map:read src="resources/javascript/ua.js"/>
  +        <map:serialize type="text"/>
         </map:match>
       </map:pipeline>
   
  -        <!-- Sitetree Javascript array      -->
  +    <!-- Sitetree Javascript array      -->
       <map:pipeline>
         <map:match pattern="**tabs.js">
  -	    <map:read src="resources/javascript/tabs.js"/>
  -	    <map:serialize type="text"/>
  +        <map:read src="resources/javascript/tabs.js"/>
  +        <map:serialize type="text"/>
         </map:match>
       </map:pipeline>
   
  -<!-- FIXME: the main pipeline. the nested pipelines check if the language and the default
tab to be shown are set.
  -     very ugly, i guess it could be done diferently. What about a resource? -->    
  +    <!-- FIXME: the main pipeline. the nested pipelines check if the language and the
default tab to be shown are set.
  +    very ugly, i guess it could be done diferently. What about a resource? -->    
       <map:pipeline>
         <map:match pattern="**">
  -      	<map:match pattern="*" type="language">
  -      	  <map:match pattern="*" type="tab">
  -	    <map:aggregate element="lenya" label="aggregate">
  -              <map:part src="cocoon:/menus/info.xml"/>
  -	      <map:part element="cmsbody" type="serverpages" src="content/info/overview.xsp"/>
  -	    </map:aggregate>
  -	    <map:transform src="xslt/info/root.xsl" label="content">
  -              <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
  -              <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
  +        <map:match pattern="*" type="language">
  +          <map:match pattern="*" type="tab">
  +            <map:call resource="aggregate-and-transform-tab">
                 <map:parameter name="tab" value="{1}"/>
  -              <map:parameter name="area" value="{page-envelope:area}"/>
                 <map:parameter name="chosenlanguage" value="{../1}"/>
                 <map:parameter name="documentid" value="{../../1}"/>
  -              <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
  -            </map:transform>
  -	    <map:serialize/>
  +            </map:call>
             </map:match>
   
             <!-- No tab parameter -->
  -	  <map:aggregate element="lenya" label="aggregate">
  -            <map:part src="cocoon:/menus/info.xml"/>
  -	    <map:part element="cmsbody" type="serverpages" src="content/info/overview.xsp"/>
  -	  </map:aggregate>
  -	  <map:transform src="xslt/info/root.xsl" label="content">
  -            <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
  -            <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
  +          <map:call resource="aggregate-and-transform-tab">
               <map:parameter name="tab" value=""/>
  -            <map:parameter name="area" value="{page-envelope:area}"/>
               <map:parameter name="chosenlanguage" value="{1}"/>
               <map:parameter name="documentid" value="{../1}"/>
  -            <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
  -          </map:transform>
  -	  <map:serialize/>
  +          </map:call>
           </map:match>
   
           <!-- No language -->
  -      	<map:match pattern="*" type="tab">
  -	  <map:aggregate element="lenya" label="aggregate">
  -            <map:part src="cocoon:/menus/info.xml"/>
  -	    <map:part element="cmsbody" type="serverpages" src="content/info/overview.xsp"/>
  -	  </map:aggregate>
  -	  <map:transform src="xslt/info/root.xsl" label="content">
  -            <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
  -            <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
  -            <map:parameter name="area" value="{page-envelope:area}"/>
  +        <map:match pattern="*" type="tab">
  +          <map:call resource="aggregate-and-transform-tab">
               <map:parameter name="tab" value="{1}"/>
               <map:parameter name="chosenlanguage" value=""/>
               <map:parameter name="documentid" value="{../1}"/>
  -            <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
  -          </map:transform>
  -	  <map:serialize/>
  +          </map:call>
           </map:match>
   
  -
           <!-- No language and no tab -->
  -	<map:aggregate element="lenya" label="aggregate">
  -          <map:part src="cocoon:/menus/info.xml"/>
  -	  <map:part element="cmsbody" type="serverpages" src="content/info/overview.xsp"/>
  -	</map:aggregate>
  -	<map:transform src="xslt/info/root.xsl" label="content">
  -          <map:parameter name="contextprefix" value="{page-envelope:context-prefix}"/>
  -          <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
  -          <map:parameter name="area" value="{page-envelope:area}"/>
  +        <map:call resource="aggregate-and-transform-tab">
             <map:parameter name="tab" value=""/>
             <map:parameter name="chosenlanguage" value=""/>
             <map:parameter name="documentid" value="{1}"/>
  -          <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
  -        </map:transform>
  -	<map:serialize/>
  +        </map:call>
  +
         </map:match>
       </map:pipeline>
     </map:pipelines>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org


Mime
View raw message