cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/webapp/mount/mod-db sitemap.xmap
Date Thu, 04 Apr 2002 14:37:01 GMT
haul        02/04/04 06:37:01

  Modified:    src/scratchpad/webapp/mount/mod-db sitemap.xmap
  Log:
  removed commented-out syntax from previous incarnation
  added some more comments for clarification
  
  Revision  Changes    Path
  1.3       +99 -133   xml-cocoon2/src/scratchpad/webapp/mount/mod-db/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/mod-db/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sitemap.xmap	15 Mar 2002 15:25:22 -0000	1.2
  +++ sitemap.xmap	4 Apr 2002 14:37:00 -0000	1.3
  @@ -19,86 +19,52 @@
       <map:selectors default="browser"/>
   
       <map:matchers default="wildcard">
  -	  <map:matcher logger="sitemap.matcher.modular.non-cached" name="uri" src="org.apache.cocoon.matching.modular.WildcardMatcher">
  -		<input-module name="URI"/>
  -	  </map:matcher>
  -	  <map:matcher logger="sitemap.matcher.modular.cached" name="cached-uri" src="org.apache.cocoon.matching.modular.CachingWildcardMatcher">
  -		<input-module name="URI"/>
  -	  </map:matcher>
  -	</map:matchers>
  +      <map:matcher logger="sitemap.matcher.modular.non-cached" name="uri" src="org.apache.cocoon.matching.modular.WildcardMatcher">
  +        <input-module name="URI"/>
  +      </map:matcher>
  +      <map:matcher logger="sitemap.matcher.modular.cached" name="cached-uri" src="org.apache.cocoon.matching.modular.CachingWildcardMatcher">
  +        <input-module name="URI"/>
  +      </map:matcher>
  +    </map:matchers>
   
       <map:actions>
          <!-- these action are in addition to the ones inherited -->
   
  -
          <!-- declare actions for database operations -->
          <map:action name="mod-db-add" src="org.apache.cocoon.acting.modular.DatabaseAddAction">
  -   	      <descriptor>context://mount/mod-db/database.xml</descriptor>
  -	      <!-- shall we throw an exception in addition to rolling back
  -	           the transaction when encountering an error during
  -	           database ops? 
  -	      -->
  -     	  <throw-exception>false</throw-exception>
  +          <descriptor>context://mount/mod-db/database.xml</descriptor>
  +          <!-- shall we throw an exception in addition to rolling back
  +               the transaction when encountering an error during
  +               database ops? 
  +          -->
  +          <throw-exception>false</throw-exception>
  +          <!-- if results should be directed to another destination than the
  +               default request attributes, use e.g.
  +
  +               <output>session</output>
  +
  +               this can also be specified on the fly through a map:parameter
  +               named "output"
  +               remember, that input-/output-modules need to be declared in your
  +               cocoon.xconf in order to be used here.
  +          -->
          </map:action>
   
          <map:action name="mod-db-del" src="org.apache.cocoon.acting.modular.DatabaseDeleteAction">
  -   	      <descriptor>context://mount/mod-db/database.xml</descriptor>
  -     	  <throw-exception>false</throw-exception>
  +          <descriptor>context://mount/mod-db/database.xml</descriptor>
  +          <throw-exception>false</throw-exception>
          </map:action>
   
          <map:action name="mod-db-upd" src="org.apache.cocoon.acting.modular.DatabaseUpdateAction">
  -   	      <descriptor>context://mount/mod-db/database.xml</descriptor>
  -     	  <throw-exception>false</throw-exception>
  +          <descriptor>context://mount/mod-db/database.xml</descriptor>
  +          <throw-exception>false</throw-exception>
          </map:action>
   
   
  +       <!-- a real world application would use the form validation here -->
  +       <!-- this action just checks for existence of request parameters -->
          <map:action name="req-params" src="org.apache.cocoon.acting.RequestParameterExistsAction"/>
   
  -<!--
  -       <map:action name="mod-db-add" src="org.apache.cocoon.acting.ModularDatabaseAddAction">
  -   	      <descriptor>context://mount/mod-db/database.xml</descriptor>
  -     	  <throw-exception>false</throw-exception>
  -   	 	  <mode name="auto" src="org.apache.cocoon.acting.ModularDatabaseAccess.HsqlIdentityAutoIncrementHelper"/>
  -   	 	  <mode name="request" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestParameterHelper"/>
  -   	 	  <mode name="attribute" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestAttributeHelper"/>
  -   	 	  <output name="request" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestAttributeOutputHelper"/>
  -       </map:action>
  --->
  - 	  <!--
  -       <map:action name="mod-db-del" src="org.apache.cocoon.acting.ModularDatabaseDeleteAction">
  -   	 	  <descriptor>context://mount/mod-db/database.xml</descriptor>
  -   	 	  <throw-exception>false</throw-exception>
  -
  -	 	     It doesn't make sense to declare AutoIncrementHelpers for
  -	 	     this action, but until component handling is removed from
  -	 	     ModularDatabaseAction and done e.g. in sitemap,
  -	 	     ModularDatabaseAction will complain if such a helper is
  -	 	     missing. 
  -
  -   	 	  <mode name="auto" src="org.apache.cocoon.acting.ModularDatabaseAccess.HsqlIdentityAutoIncrementHelper"/>
  -   	 	  <mode name="request" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestParameterHelper"/>
  -   	 	  <mode name="attribute" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestAttributeHelper"/>
  -   	 	  <output name="request" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestAttributeOutputHelper"/>
  -       </map:action>
  - 	  -->
  -
  -	 <!--
  -       <map:action name="mod-db-upd" src="org.apache.cocoon.acting.ModularDatabaseUpdateAction">
  -   	 	  <descriptor>context://mount/mod-db/database.xml</descriptor>
  -   	 	  <throw-exception>false</throw-exception>
  -
  -	 	     It doesn't make sense to declare AutoIncrementHelpers for
  -	 	     this action, but until component handling is removed from
  -	 	     ModularDatabaseAction and done e.g. in sitemap,
  -	 	     ModularDatabaseAction will complain if such a helper is
  -	 	     missing. 
  -
  -   	 	  <mode name="auto" src="org.apache.cocoon.acting.ModularDatabaseAccess.HsqlIdentityAutoIncrementHelper"/>
  -   	 	  <mode name="request" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestParameterHelper"/>
  -   	 	  <mode name="attribute" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestAttributeHelper"/>
  -   	 	  <output name="request" src="org.apache.cocoon.acting.ModularDatabaseAccess.RequestAttributeOutputHelper"/>
  -       </map:action>
  -	 -->
       </map:actions>
   
     </map:components>
  @@ -127,104 +93,104 @@
          <map:match pattern="*">
   
             <!--
  -	     First, the logic to do all the database operations. Note,
  -	     that we do no parameter validation here, just see if some
  -	     parameters are present. For a real application, you'd
  -	     want to check their values as well. Note too, that in a
  -	     more complex setup you'd want to use an action set for
  -	     this rather than spell it out everywhere.
  -	  -->
  +         First, the logic to do all the database operations. Note,
  +         that we do no parameter validation here, just see if some
  +         parameters are present. For a real application, you'd
  +         want to check their values as well. Note too, that in a
  +         more complex setup you'd want to use an action set for
  +         this rather than spell it out everywhere.
  +      -->
   
             <!-- ______________________________ inserts ______________________________
-->
   
             <!-- add new groups to a user's groups -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="add-groups user_groups.uid user_groups.gid"/>
  -  	     <map:act type="mod-db-add">
  -  	  	<map:parameter name="table-set" value="user_groups"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="add-groups user_groups.uid user_groups.gid"/>
  +         <map:act type="mod-db-add">
  +        <map:parameter name="table-set" value="user_groups"/>
  +         </map:act>
  +      </map:act>
   
             <!-- add onw new group -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="add-group groups.gname"/>
  -  	     <map:act type="mod-db-add">
  -  	  	<map:parameter name="table-set" value="groups"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="add-group groups.gname"/>
  +         <map:act type="mod-db-add">
  +        <map:parameter name="table-set" value="groups"/>
  +         </map:act>
  +      </map:act>
        
             <!-- add one new user -->
  -	  <!-- Actually, this one is not used anymore. The one below
  -	       works well when no groups are supplied.
  -	   -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="add-user user.name user.firstname user.uname"/>
  -  	     <map:act type="mod-db-add">
  -  	  	<map:parameter name="table-set" value="user"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <!-- Actually, this one is not used anymore. The one below
  +           works well when no groups are supplied.
  +       -->
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="add-user user.name user.firstname user.uname"/>
  +         <map:act type="mod-db-add">
  +        <map:parameter name="table-set" value="user"/>
  +         </map:act>
  +      </map:act>
        
             <!-- add one new user plus groups -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="add-user-groups user.name user.firstname
user.uname"/>
  -  	     <map:act type="mod-db-add">
  -  	  	<map:parameter name="table-set" value="user+groups"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="add-user-groups user.name user.firstname
user.uname"/>
  +         <map:act type="mod-db-add">
  +        <map:parameter name="table-set" value="user+groups"/>
  +         </map:act>
  +      </map:act>
        
             <!-- ______________________________ updates ______________________________
-->
   
             <!-- update one user -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="upd-user user.uid user.name user.firstname
user.uname"/>
  -  	     <map:act type="mod-db-upd">
  -  	  	<map:parameter name="table-set" value="user"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="upd-user user.uid user.name user.firstname
user.uname"/>
  +         <map:act type="mod-db-upd">
  +        <map:parameter name="table-set" value="user"/>
  +         </map:act>
  +      </map:act>
        
   
             <!-- update one group -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="upd-group groups.gid groups.gname"/>
  -  	     <map:act type="mod-db-upd">
  -  	  	<map:parameter name="table-set" value="groups"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="upd-group groups.gid groups.gname"/>
  +         <map:act type="mod-db-upd">
  +        <map:parameter name="table-set" value="groups"/>
  +         </map:act>
  +      </map:act>
        
             <!-- ______________________________ deletes ______________________________
-->
   
             <!-- delete one user -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="del-user user.uid"/>
  -  	     <map:act type="mod-db-del">
  -  	  	<map:parameter name="table-set" value="user"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="del-user user.uid"/>
  +         <map:act type="mod-db-del">
  +        <map:parameter name="table-set" value="user"/>
  +         </map:act>
  +      </map:act>
   
             <!-- delete one group -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="del-group groups.gid"/>
  -  	     <map:act type="mod-db-del">
  -  	  	<map:parameter name="table-set" value="groups"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="del-group groups.gid"/>
  +         <map:act type="mod-db-del">
  +        <map:parameter name="table-set" value="groups"/>
  +         </map:act>
  +      </map:act>
        
             <!-- delete groups from a user's groups -->
  -  	  <map:act type="req-params">
  -  	     <map:parameter name="parameters" value="remove-groups user_groups.uid user_groups.gid"/>
  -  	     <map:act type="mod-db-del">
  -  	  	<map:parameter name="table-set" value="user_groups"/>
  -  	     </map:act>
  -  	  </map:act>
  +      <map:act type="req-params">
  +         <map:parameter name="parameters" value="remove-groups user_groups.uid user_groups.gid"/>
  +         <map:act type="mod-db-del">
  +        <map:parameter name="table-set" value="user_groups"/>
  +         </map:act>
  +      </map:act>
   
             <!-- ______________________________ content  ______________________________
-->
   
  -  	  <map:generate type="serverpages" src="{1}.xsp"/>
  -	  <map:transform src="context://stylesheets/dynamic-page2html.xsl">
  -	     <map:parameter name="view-source" value="{1}.xsp"/>
  -	  </map:transform>
  -  	  <map:transform src="stupid.xsl"/>
  -  	  <map:serialize/>
  +      <map:generate type="serverpages" src="{1}.xsp"/>
  +      <map:transform src="context://stylesheets/dynamic-page2html.xsl">
  +         <map:parameter name="view-source" value="{1}.xsp"/>
  +      </map:transform>
  +      <map:transform src="stupid.xsl"/>
  +      <map:serialize/>
   
          </map:match>
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message