You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ling Kok Choon <ko...@brel.com> on 2001/09/07 03:08:07 UTC

Re: AW: XML selector

Hi, JOERN_HEID and All

JOERN_HEID is right.
I use the action to select XML based on the request. I am not sure is it can help u or not ...


regards,

Kok Choon

<map:components>
>   ...
>   ... 
>   <map:actions>
>    <!-- here i register my action -->
>    <map:action name="path-selector" src="action.PathSelector"/>      
>   </map:actions>
>  </map:components>
>  
>  <map:pipelines>
>    <map:pipeline>
>   
>    <!-- here is the aggregation part -- >
> 
>    <!-- here is the center part of the aggregation -- >
>    <!-- Note: the web page is a aggregated page, it aggregated from 5 smaller part -->   
>    <!-- The path-selector action return the requested path URL and XSLPath for this web page 
-->
>    <!-- path-selection action will search the database to get the centerXSLPath and return to
>         the sitemap -- >
> 
>     <map:match pattern="**.agg">
>        <map:act type="path-selector">  
>          <map:parameter name="skel"  value="false" /> 
>          <map:parameter name="template"  value="1" /> 
>          <map:generate src="{path}"/> 
>          <map:transform src="{centerXSLPath}"/> 
>        </map:act>	       
>          <map:serialize type="html"/>       
>      </map:match>
> 
>     <!-- here is the foot_note of the aggregation page-- >
>     <!-- this part will only show the copyright information and address -->
>      <map:match pattern="foot_note.xml">
>          <map:generate src="xml/foot_note.xml"/> 
>          <map:transform src="stylesheet/foot_note.xsl"/>        
>          <map:serialize type="html"/>       
>      </map:match>
>      
>     <!-- here is the side_menu of the aggregation page-- >
>     <!-- here we use the dummy xml file, because we don't have any infomation to put -->
>     <!-- this part is only contain picture and javascript -- >  
>      <map:match pattern="side_menu.xml">
>          <map:generate src="xml/dummy.xml"/> 
>          <map:transform src="stylesheet/side_menu.xsl"/>        
>          <map:serialize type="html"/>       
>      </map:match>
>      
>      <!-- here is the Navigation Link of the aggregation page-- >     
>      <!-- User may use the Content Management System to select which page will be linked -->
>      <!-- and the linked page information will stored in database. -- >
>      <!-- This link will be generated according the information from database -- >
>      <!-- and we use esql tanglib to connect to the database -- >
>      <map:match pattern="links.xml">
>           <map:generate type="serverpages" src="xml/link.xsp"/> 
>           <map:transform src="stylesheet/links.xsl"/>               
>          <map:serialize/>       
>      </map:match>
>      
>     <!-- here is the aggregation mapping -->     
>      <map:match pattern="**.xml">
>        <map:act type="path-selector"> 
>           <map:parameter name="skel"  value="true" />        
>       	<map:aggregate element="page" >
>       	  <map:part src="{path}" element="maincontent" 
ns="http://www.brel.com/maincontent"/>    
>    	  
>       	  <map:part src="foot_note.xml" element="foot_note" 
ns="http://www.brel.com/foot_note"/> 
> 
>       	  <map:part src="side_menu.xml" element="side_menu" 
ns="http://www.brel.com/side_menu"/> 
> 
>       	  <map:part src="links.xml" element="links" ns="http://www.brel.com/links"/> 
>       	</map:aggregate>      	
>       	<map:transform src="{aggXSLPath}"/> 
>        </map:act>	
>        
>        <map:serialize type="html"/>    	
>     </map:match>
>    
>       
>       <map:match pattern="**.gif">
>          <map:act type="path-selector">
>              <map:read src="{path}" mime-type="image/gif"/>  
>          </map:act>          
>       </map:match>
>       
>       <map:match pattern="**.css">
>              <map:act type="path-selector">
>                  <map:read src="{path}" mime-type="text/css"/>  
>              </map:act>          
>       </map:match>
>       
>       <map:match pattern="**.jpg">
>               <map:act type="path-selector">
>                   <map:read src="{path}" mime-type="image/jpg"/>  
>               </map:act>    
>       
>       </map:match>
>       
>       <map:match pattern="**.png">
>           <map:act type="path-selector">
>              <map:read src="{path}" mime-type="image/png"/>  
>           </map:act>       
>       </map:match>
>       
>       <map:match pattern="**.swf">
>          <map:act type="path-selector">
>          <map:read src="{path}" mime-type="application/x-shockwave-flash"/>
>          </map:act>       
>       </map:match>
> 
>       <map:match pattern="**.js">
>         <map:act type="path-selector">
>            <map:read src="{path}" mime-type="text/javascript"/>
>         </map:act>
>       </map:match>
>       
>       
>       
>       <map:match pattern="**.doc">
>         <map:act type="path-selector">
>            <map:read src="{path}" mime-type="application/winword"/>
>         </map:act>    
>       </map:match>
>       
>       <map:match pattern="**.rtf">
>             <map:act type="path-selector">
>                <map:read src="{path}" mime-type="application/winword"/>
>             </map:act>    
>       </map:match>
> 
>    <map:match pattern="*">
>        <map:act type="path-selector">
>            <map:read src="{path}" mime-type="application/winword"/>
>        </map:act>    
>    </map:match>
--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 09/07/01
Time: 09:08:07

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>