unico       2004/03/10 08:19:27

  Modified:    src/webapp/samples/protected sitemap.xmap
  Added:       src/webapp/samples/protected/docs protected.xml
  Removed:     src/webapp/samples/protected/docs protected.xsp
  Log:
  remove dependency on xsp from protected samples
  
  Revision  Changes    Path
  1.7       +6 -2      cocoon-2.2/src/webapp/samples/protected/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/webapp/samples/protected/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap      10 Mar 2004 10:27:53 -0000      1.6
  +++ sitemap.xmap      10 Mar 2004 16:19:27 -0000      1.7
  @@ -104,7 +104,11 @@
             <map:parameter name="descriptor" value="descriptors/params.xml"/>
             <map:parameter name="validate" 
value="username,department_id,theme"/>
             <!-- generate protected content -->
  -          <map:generate type="serverpages" src="docs/protected.xsp"/>
  +          <map:generate type="jx" src="docs/protected.xml">
  +            <map:parameter name="username" value="{session-attr:username}"/>
  +            <map:parameter name="department_id" 
value="{session-attr:department_id}"/>
  +            <map:parameter name="theme" value="{session-attr:theme}"/>
  +          </map:generate>
             <map:transform src="stylesheets/{theme}-page2html.xsl">
               <map:parameter name="servletPath" value="{request:servletPath}"/>
               <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  
  
  
  1.1                  
cocoon-2.2/src/webapp/samples/protected/docs/protected.xml
  
  Index: protected.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  -->
  
  <!-- CVS: $Id: protected.xml,v 1.1 2004/03/10 16:19:27 unico Exp $ -->
  <page>
    <resources>
      <resource type="file" 
href="descriptors/auth.xml?cocoon-view=pretty-content">Authenticator</resource>
      <resource type="file" 
href="descriptors/params.xml?cocoon-view=pretty-content">Validator</resource>
      <resource type="doc" 
href="userdocs/actions/database-actions.html">Actions</resource>
    </resources>
    <title>Protected area</title>
    <content>
      <linkbar/>
      <para>
        Wow, you have entered secret area, 
        now its time to examine sub-sitemap and
        think about what can be improved regarding flow control and especially
        aspect capturing, so that it is not necessary to check session in every
        map:match fragment. :-))
        <br/>
        &#160; -- Martin Man
      </para>
      <para>You are logged in under username: 
${parameters.getParameter('username')}</para>
      <para>Your department id is: 
${parameters.getParameter('department_id')}</para>
      <para>Your web page theme is: ${parameters.getParameter('theme')}</para>
    </content>
  </page>
  <!-- vim: set et ts=2 sw=2: -->
  
  
  

Reply via email to