You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/02/18 15:09:51 UTC

cvs commit: xml-cocoon2/tools/src SitemapToolTask.java

cziegeler    02/02/18 06:09:51

  Modified:    .        build.xml
               src/webapp sitemap.xmap
               src/webapp/docs/samples samples.xml
               tools/src SitemapToolTask.java
  Added:       src/scratchpad/src/org/apache/cocoon/sunshine
                        sunshine.pipeline sunshine.sitemap
               src/scratchpad/src/org/apache/cocoon/transformation
                        encodeurl.sitemap
  Log:
  Webapp runs again without any scratchpad code
  
  Revision  Changes    Path
  1.171     +2 -0      xml-cocoon2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/build.xml,v
  retrieving revision 1.170
  retrieving revision 1.171
  diff -u -r1.170 -r1.171
  --- build.xml	18 Feb 2002 13:29:50 -0000	1.170
  +++ build.xml	18 Feb 2002 14:09:50 -0000	1.171
  @@ -1041,6 +1041,7 @@
         <!-- Invoke the SitemapToolTask to add optional entries -->
         <sitemap-tool directory="${build.src}"
                      extension="sitemap"
  +                   pipelineExtension="pipeline"
                      sitemap="${build.war}/sitemap.xmap"/>
   
         <!-- Invoke the XConfTool to add optional entries -->
  @@ -1058,6 +1059,7 @@
         <!-- Invoke the SitemapToolTask to add optional entries -->
         <sitemap-tool directory="${build.scratchpad.src}"
                      extension="sitemap"
  +                   pipelineExtension="pipeline"
                      sitemap="${build.war}/sitemap.xmap"/>
   
         <!-- Invoke the XConfTool to add optional entries -->
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine.pipeline
  
  Index: sunshine.pipeline
  ===================================================================
  <!-- This is the sunSpot Cocoon Demo Portal Pipeline -->
   <map:pipeline internal-only="true">
  	<map:match pattern="sunspotdemoresource-sunrise-*">
  
  		<!-- authentication -->
  		<map:match pattern="sunspotdemoresource-sunrise-authuser">
  			<map:generate src="sunspotdemo/resources/sunrise-user.xml"/>
  			<map:transform src="sunspotdemo/styles/sunrise-user.xsl">
     				<map:parameter name="use-request-parameters" value="true"/>
                    </map:transform>
  			<map:serialize type="xml"/>
  		</map:match>
  	
  		<map:match pattern="sunspotdemoresource-sunrise-changeuser">
  			<map:generate src="sunspotdemo/resources/sunrise-changeuser.xml"/>
  			<map:transform type="sunShine"/>
  			<map:transform src="sunspotdemo/styles/changeuser.xsl"/>
  			<map:transform type="sunShineInsert"/>
  			<map:transform src="sunspotdemo/styles/portal.xsl"/>
  			<map:serialize type="xml"/>
  		</map:match>
  
  		<map:match pattern="sunspotdemoresource-*">
  			<map:generate src="sunspotdemo/resources/{1}.xml"/>
  			<map:transform type="sunShine"/>
  			<map:transform type="sunShineInsert"/>
  			<map:transform src="sunspotdemo/styles/portal.xsl"/>
  			<map:serialize type="xml"/>
  		</map:match>
  	</map:match>
    </map:pipeline>
  
  <!-- This is the sunSpot Cocoon Demo Portal Pipeline -->
    <map:pipeline>
  
  	<map:match pattern="sunspotdemoportal">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-portal"/>
  		</map:act>
  		<map:generate src="sunspotdemo/resources/free/portal.xml"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  
  	<!-- images -->
  	 <map:match pattern="sunspotdemoimg-*.gif">
  		<map:read mime-type="image/gif" src="sunspotdemo/images/{1}.gif"/>
  	</map:match>
  	<map:match pattern="sunspotdemoimg-*.jpg">
      		<map:read mime-type="image/jpg" src="sunspotdemo/images/{1}.jpg"/>
     	</map:match>
  
  	<!-- free sites -->
  	<map:match pattern="sunspotdemofree-login">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-portal"/>
  		</map:act>
  		<map:generate src="sunspotdemo/resources/free/login.xml"/>
  		<map:transform src="sunspotdemo/styles/login-html.xsl"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  	<map:match pattern="sunspotdemofree-auth">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-loggedin"/>
  		</map:act>
    	     	<map:act type="sunRise-login">
  	      	<map:parameter name="handler" value="sunspotdemohandler"/>
  			<map:parameter name="parameter_name" value="request:name"/>
  			<map:parameter name="parameter_password" value="request:password"/>
    			<map:redirect-to uri="sunspotdemo-portal"/>
  	      </map:act>
  		<map:generate src="sunspotdemo/resources/free/auth.xml"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  	<map:match pattern="sunspotdemofree-*">
  		<map:act type="sunRise-loggedIn">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:redirect-to uri="sunspotdemo-portal"/>
  		</map:act>
  		<map:generate src="sunspotdemo/resources/free/{1}.xml"/>
  		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  		<map:transform type="encodeURL"/>
  		<map:serialize/>
  	</map:match>
  
        <map:match pattern="sunspotdemo**">
  		<map:act type="sunRise-auth">
  			<map:parameter name="handler" value="sunspotdemohandler"/> 
  			<map:parameter name="application" value="sunspotdemo"/> 
  	
  			<map:match pattern="sunspotdemoresource-save*">
  				<map:generate src="sunspotdemo/resources/save{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform type="sunShineInsert"/>
  				<map:serialize type="xml"/>
  			</map:match>
  			<map:match pattern="sunspotdemoresource-*">
  				<map:generate src="sunspotdemo/resources/{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform type="sunShineInsert"/>
  				<map:transform src="sunspotdemo/styles/portal.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  
  		<!-- sunlets -->
  			<map:match pattern="sunspotdemosunlet-onlinesundn.xml"> 
  				<map:generate src="http://www.s-und-n.de/aktuelles/news.xml"/>
  				<map:transform src="sunspotdemo/styles/sunLet_sundnNews.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  
  			<map:match pattern="sunspotdemosunlet-online-*.xml"> 
  				<map:generate src="http://p.moreover.com/cgi-local/page?index_{1}+xml"/>
  				<map:transform src="sunspotdemo/styles/sunLet_MoreoverDotCom.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  			<map:match pattern="sunspotdemosunlet-customnews">
  				<map:generate src="sunspotdemo/resources/auth/sunlet-customnews.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform src="sunspotdemo/styles/sunLet_MoreoverDotCom.xsl"/>
  				<map:serialize type="xml"/> 
  			</map:match>
  			<map:match pattern="sunspotdemosunletconf-*"> 
  				<map:generate src="sunspotdemo/resources/auth/sunletconfig-{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform src="sunspotdemo/styles/sunletconf.xsl"/>
  				<map:serialize type="xml"/>
  			</map:match>
  
  			<map:match pattern="sunspotdemosunlet-*.xml"> 
  				<map:generate src="sunspotdemo/resources/auth/sunlet-{1}.xml"/>
  				<map:serialize type="xml"/>
  			</map:match>
  					
  
  		<!-- auth sites -->
  
  			<map:match pattern="sunspotdemo-conf">
  				<map:generate type="sunSpot-conf"/>
  				<map:transform src="sunspotdemo/styles/portalconfHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  			<map:match pattern="sunspotdemo-adminconf">
  				<!-- This pipeline can only be accessed if the current user is
                               allowed to configure the 'administration' sunLet -->
  				<map:act type="sunSpot-auth">
  					<map:parameter name="sunLet" value="administration"/>
  				</map:act>
  				<map:generate src="admin" type="sunSpot-conf"/>
  				<map:transform src="sunspotdemo/styles/portalconfHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match> 
  			<map:match pattern="sunspotdemo-sunriseconf">
  				<!-- This pipeline can only be accessed if the current user is
                               allowed to configure the 'administration' sunLet -->
  				<map:act type="sunSpot-auth">
  					<map:parameter name="sunLet" value="administration"/>
  				</map:act>
  				<map:generate type="sunRise-conf"/>
  				<map:transform src="sunspotdemo/styles/sunriseconfHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match> 
  			<map:match pattern="sunspotdemo-sunriseedit">
  				<map:generate src="user" type="sunRise-conf"/>
  				<map:transform src="sunspotdemo/styles/sunriseeditHTML.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match> 
  			<map:match pattern="sunspotdemo-portlets">
  				<map:generate type="sunSpot"/>
  				<map:select type="browser">
  					<map:when test="explorer">
  						<map:transform src="sunspotdemo/styles/portalHTML.xsl"/>
  					</map:when>
  					<map:when test="netscape">
  						<map:transform src="sunspotdemo/styles/portalHTML-Netscape.xsl"/>
  					</map:when>
  					<map:otherwise>
  						<map:transform src="sunspotdemo/styles/portalHTML.xsl"/>
  					</map:otherwise>
  				</map:select>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  			<map:match pattern="sunspotdemo-logout">
  				<map:act type="sunRise-logout"/>
  				<map:generate src="sunspotdemo/resources/auth/logout.xml"/>
  				<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  			<map:match pattern="sunspotdemo-*">
  				<map:generate src="sunspotdemo/resources/auth/{1}.xml"/>
  				<map:transform type="sunShine"/>
  				<map:transform type="sunShineInsert"/>
  				<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  				<map:transform type="encodeURL"/>
  				<map:serialize/>
  			</map:match>
  		</map:act>
      </map:match>
  	
    </map:pipeline>
  
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/sunshine.sitemap
  
  Index: sunshine.sitemap
  ===================================================================
  category:generators|componentName:sunSpot|componentClass:org.apache.cocoon.sunshine.sunspot.generation.PortalGenerator|label:content,data
  category:generators|componentName:sunSpot-conf|componentClass:org.apache.cocoon.sunshine.sunspot.generation.ConfigurationGenerator|label:content,data
  category:generators|componentName:sunRise-conf|componentClass:org.apache.cocoon.sunshine.sunrise.generation.ConfigurationGenerator|label:content,data
  category:transformers|componentName:sunShine|componentClass:org.apache.cocoon.sunshine.transformation.SunShineTransformer
  category:transformers|componentName:sunShinePre|componentClass:org.apache.cocoon.sunshine.transformation.SunShinePreTransformer
  category:transformers|componentName:sunShinePost|componentClass:org.apache.cocoon.sunshine.transformation.SunShinePostTransformer
  category:transformers|componentName:sunShineInsert|componentClass:org.apache.cocoon.sunshine.transformation.InsertTransformer
  category:actions|componentName:sunShine-session|componentClass:org.apache.cocoon.sunshine.acting.SessionAction
  category:actions|componentName:sunRise-auth|componentClass:org.apache.cocoon.sunshine.sunrise.acting.AuthAction|configuration:START
          <handlers>
            <handler name="sunspotdemohandler" xmlns:map="http://apache.org/cocoon/sitemap/1.0" xmlns:sunshine="http://sunshine.sundn.de/sunshine/1.0">
  		<redirect-to uri="cocoon://sunspotdemoportal"/>
  		<authentication uri="cocoon:raw://sunspotdemoresource-sunrise-authuser"/>
  		<load-users uri="cocoon:raw://sunspotdemoresource-sunrise-loaduser"/>
  		<load-roles uri="cocoon:raw://sunspotdemoresource-sunrise-roles"/>
  		<new-user uri="cocoon:raw://sunspotdemoresource-sunrise-newuser"/>
  		<new-role uri="cocoon:raw://sunspotdemoresource-sunrise-newrole"/>
  		<change-user uri="cocoon:raw://sunspotdemoresource-sunrise-changeuser"/>
  		<delete-role uri="cocoon:raw://sunspotdemoresource-sunrise-delrole"/>
  		<delete-user uri="cocoon:raw://sunspotdemoresource-sunrise-deluser"/>
  		<applications>
  			<application loadondemand="true" name="sunspotdemo">
  				<configuration name="sunSpot">
  					<auth-redirect>sunspotdemo-portal</auth-redirect>
  					<portal-uri>sunspotdemo-portal</portal-uri>
  					<profile-cache>true</profile-cache>
  					<process-sunlets-parallel>false</process-sunlets-parallel>
  					<default-sunlet-timeout>10000</default-sunlet-timeout> <!-- milliseconds -->
  					<profile>
  						<layout-base uri="sunspotdemo/profiles/layoutprofile.xml"/>
  						<sunlet-base uri="sunspotdemo/profiles/sunletprofile.xml"/>
  						<sunlet-base-save uri="sunspotdemo/profiles/sunletprofile.xml"/>
  						<type-base uri="sunspotdemo/profiles/types.xml"/>
  						<admin-type-base uri="sunspotdemo/profiles/admintypes.xml"/>
  						<global-delta-load uri="sunspotdemo/profiles/globalprofile.xml"/>
  						<global-delta-save uri="cocoon:raw://sunspotdemoresource-saveglobalprofile"/>
  						<role-delta-load uri="cocoon:raw://sunspotdemoresource-roleprofile"/>
  						<role-delta-save uri="cocoon:raw://sunspotdemoresource-saveroleprofile"/>
  						<user-delta-load uri="cocoon:raw://sunspotdemoresource-userprofile"/>
  						<user-delta-save uri="cocoon:raw://sunspotdemoresource-saveuserprofile"/>
  						<user-status-load uri="cocoon:raw://sunspotdemoresource-userstatus"/>
  						<user-status-save uri="cocoon:raw://sunspotdemoresource-saveuserstatus"/>
  					</profile>
  				</configuration>
  			</application>
  		</applications>
  	    </handler>
          </handlers>
  END
  category:actions|componentName:sunRise-login|componentClass:org.apache.cocoon.sunshine.sunrise.acting.LoginAction
  category:actions|componentName:sunRise-logout|componentClass:org.apache.cocoon.sunshine.sunrise.acting.LogoutAction
  category:actions|componentName:sunRise-loggedIn|componentClass:org.apache.cocoon.sunshine.sunrise.acting.LoggedInAction
  category:actions|componentName:sunSpot-auth|componentClass:org.apache.cocoon.sunshine.sunspot.acting.AuthAction
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/encodeurl.sitemap
  
  Index: encodeurl.sitemap
  ===================================================================
  category:transformers|componentName:encodeURL|componentClass:org.apache.cocoon.transformation.EncodeURLTransformer
  
  
  
  1.28      +0 -286    xml-cocoon2/src/webapp/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- sitemap.xmap	18 Feb 2002 09:10:10 -0000	1.27
  +++ sitemap.xmap	18 Feb 2002 14:09:50 -0000	1.28
  @@ -69,13 +69,6 @@
   
      <map:generator name="extractor"      logger="sitemap.generator.extractor"      label="data"
                     src="org.apache.cocoon.generation.FragmentExtractorGenerator"/>
  -<!-- sunShine -->
  -<map:generator name="sunSpot"  logger="sitemap.generator.sunSpot"
  -               src="org.apache.cocoon.sunshine.sunspot.generation.PortalGenerator"/>
  -<map:generator name="sunSpot-conf" logger="sitemap.generator.sunSpot-conf"
  -               src="org.apache.cocoon.sunshine.sunspot.generation.ConfigurationGenerator"/>
  -<map:generator name="sunRise-conf" logger="sitemap.generator.sunRise-conf"
  -               src="org.apache.cocoon.sunshine.sunrise.generation.ConfigurationGenerator"/>
   </map:generators>
   
   <!--
  @@ -117,17 +110,6 @@
      <map:transformer name="readDOMsession"  logger="sitemap.transformer.readDOMsession"
                       src="org.apache.cocoon.transformation.ReadDOMSessionTransformer"/>
     
  -  <map:transformer name="encodeURL" src="org.apache.cocoon.transformation.EncodeURLTransformer"
  -                   logger="sitemap.transformer.xt"/>
  -  <!-- sunShine -->
  -  <map:transformer name="sunShine" src="org.apache.cocoon.sunshine.transformation.SunShineTransformer"
  -                   logger="sitemap.transformer.sunShine"/>
  -  <map:transformer name="sunShinePre" src="org.apache.cocoon.sunshine.transformation.SunShinePreTransformer"
  -                   logger="sitemap.transformer.sunShinePre"/>
  -  <map:transformer name="sunShinePost" src="org.apache.cocoon.sunshine.transformation.SunShinePostTransformer"
  -                   logger="sitemap.transformer.sunShinePost"/>
  -  <map:transformer name="sunShineInsert" src="org.apache.cocoon.sunshine.transformation.InsertTransformer"
  -                   logger="sitemap.transformer.sunShineInsert"/>
     </map:transformers>
   
   <!--
  @@ -313,59 +295,6 @@
      <map:action name="resource-exists" logger="sitemap.action.resource-exists"
                  src="org.apache.cocoon.acting.ResourceExistsAction"/>
   
  -   <!-- sunShine -->
  -   <map:action name="sunShine-session" logger="sitemap.action.sunShine-session"
  -               src="org.apache.cocoon.sunshine.acting.SessionAction"/>
  -   <map:action name="sunRise-auth" logger="sitemap.action.sunRise-auth"
  -               src="org.apache.cocoon.sunshine.sunrise.acting.AuthAction">
  -        <handlers>
  -          <handler name="sunspotdemohandler" xmlns:map="http://apache.org/cocoon/sitemap/1.0" xmlns:sunshine="http://sunshine.sundn.de/sunshine/1.0">
  -		<redirect-to uri="cocoon://sunspotdemoportal"/>
  -		<authentication uri="cocoon:raw://sunspotdemoresource-sunrise-authuser"/>
  -		<load-users uri="cocoon:raw://sunspotdemoresource-sunrise-loaduser"/>
  -		<load-roles uri="cocoon:raw://sunspotdemoresource-sunrise-roles"/>
  -		<new-user uri="cocoon:raw://sunspotdemoresource-sunrise-newuser"/>
  -		<new-role uri="cocoon:raw://sunspotdemoresource-sunrise-newrole"/>
  -		<change-user uri="cocoon:raw://sunspotdemoresource-sunrise-changeuser"/>
  -		<delete-role uri="cocoon:raw://sunspotdemoresource-sunrise-delrole"/>
  -		<delete-user uri="cocoon:raw://sunspotdemoresource-sunrise-deluser"/>
  -		<applications>
  -			<application loadondemand="true" name="sunspotdemo">
  -				<configuration name="sunSpot">
  -					<auth-redirect>sunspotdemo-portal</auth-redirect>
  -					<portal-uri>sunspotdemo-portal</portal-uri>
  -					<profile-cache>true</profile-cache>
  -					<process-sunlets-parallel>false</process-sunlets-parallel>
  -					<default-sunlet-timeout>10000</default-sunlet-timeout> <!-- milliseconds -->
  -					<profile>
  -						<layout-base uri="sunspotdemo/profiles/layoutprofile.xml"/>
  -						<sunlet-base uri="sunspotdemo/profiles/sunletprofile.xml"/>
  -						<sunlet-base-save uri="sunspotdemo/profiles/sunletprofile.xml"/>
  -						<type-base uri="sunspotdemo/profiles/types.xml"/>
  -						<admin-type-base uri="sunspotdemo/profiles/admintypes.xml"/>
  -						<global-delta-load uri="sunspotdemo/profiles/globalprofile.xml"/>
  -						<global-delta-save uri="cocoon:raw://sunspotdemoresource-saveglobalprofile"/>
  -						<role-delta-load uri="cocoon:raw://sunspotdemoresource-roleprofile"/>
  -						<role-delta-save uri="cocoon:raw://sunspotdemoresource-saveroleprofile"/>
  -						<user-delta-load uri="cocoon:raw://sunspotdemoresource-userprofile"/>
  -						<user-delta-save uri="cocoon:raw://sunspotdemoresource-saveuserprofile"/>
  -						<user-status-load uri="cocoon:raw://sunspotdemoresource-userstatus"/>
  -						<user-status-save uri="cocoon:raw://sunspotdemoresource-saveuserstatus"/>
  -					</profile>
  -				</configuration>
  -			</application>
  -		</applications>
  -	    </handler>
  -        </handlers>
  -   </map:action>
  -   <map:action name="sunRise-login" logger="sitemap.action.sunRise-login"
  -               src="org.apache.cocoon.sunshine.sunrise.acting.LoginAction"/>
  -   <map:action name="sunRise-logout" logger="sitemap.action.sunRise-logout"
  -               src="org.apache.cocoon.sunshine.sunrise.acting.LogoutAction"/>
  -   <map:action name="sunRise-loggedIn" logger="sitemap.action.sunRise-loggedIn"
  -               src="org.apache.cocoon.sunshine.sunrise.acting.LoggedInAction"/>
  -   <map:action name="sunSpot-auth" logger="sitemap.action.sunSpot-auth"
  -               src="org.apache.cocoon.sunshine.sunspot.acting.AuthAction"/>
     </map:actions>
    </map:components>
   
  @@ -620,221 +549,6 @@
        brackets denote sitemap variables, here the one named "1".
         -->
       </map:match>
  -  </map:pipeline>
  -
  -<!-- This is the sunSpot Cocoon Demo Portal Pipeline -->
  - <map:pipeline internal-only="true">
  -	<map:match pattern="sunspotdemoresource-sunrise-*">
  -
  -		<!-- authentication -->
  -		<map:match pattern="sunspotdemoresource-sunrise-authuser">
  -			<map:generate src="sunspotdemo/resources/sunrise-user.xml"/>
  -			<map:transform src="sunspotdemo/styles/sunrise-user.xsl">
  -   				<map:parameter name="use-request-parameters" value="true"/>
  -                  </map:transform>
  -			<map:serialize type="xml"/>
  -		</map:match>
  -	
  -		<map:match pattern="sunspotdemoresource-sunrise-changeuser">
  -			<map:generate src="sunspotdemo/resources/sunrise-changeuser.xml"/>
  -			<map:transform type="sunShine"/>
  -			<map:transform src="sunspotdemo/styles/changeuser.xsl"/>
  -			<map:transform type="sunShineInsert"/>
  -			<map:transform src="sunspotdemo/styles/portal.xsl"/>
  -			<map:serialize type="xml"/>
  -		</map:match>
  -
  -		<map:match pattern="sunspotdemoresource-*">
  -			<map:generate src="sunspotdemo/resources/{1}.xml"/>
  -			<map:transform type="sunShine"/>
  -			<map:transform type="sunShineInsert"/>
  -			<map:transform src="sunspotdemo/styles/portal.xsl"/>
  -			<map:serialize type="xml"/>
  -		</map:match>
  -	</map:match>
  -  </map:pipeline>
  -
  -<!-- This is the sunSpot Cocoon Demo Portal Pipeline -->
  -  <map:pipeline>
  -
  -	<map:match pattern="sunspotdemoportal">
  -		<map:act type="sunRise-loggedIn">
  -			<map:parameter name="handler" value="sunspotdemohandler"/> 
  -			<map:redirect-to uri="sunspotdemo-portal"/>
  -		</map:act>
  -		<map:generate src="sunspotdemo/resources/free/portal.xml"/>
  -		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  -		<map:transform type="encodeURL"/>
  -		<map:serialize/>
  -	</map:match>
  -
  -	<!-- images -->
  -	 <map:match pattern="sunspotdemoimg-*.gif">
  -		<map:read mime-type="image/gif" src="sunspotdemo/images/{1}.gif"/>
  -	</map:match>
  -	<map:match pattern="sunspotdemoimg-*.jpg">
  -    		<map:read mime-type="image/jpg" src="sunspotdemo/images/{1}.jpg"/>
  -   	</map:match>
  -
  -	<!-- free sites -->
  -	<map:match pattern="sunspotdemofree-login">
  -		<map:act type="sunRise-loggedIn">
  -			<map:parameter name="handler" value="sunspotdemohandler"/> 
  -			<map:redirect-to uri="sunspotdemo-portal"/>
  -		</map:act>
  -		<map:generate src="sunspotdemo/resources/free/login.xml"/>
  -		<map:transform src="sunspotdemo/styles/login-html.xsl"/>
  -		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  -		<map:transform type="encodeURL"/>
  -		<map:serialize/>
  -	</map:match>
  -	<map:match pattern="sunspotdemofree-auth">
  -		<map:act type="sunRise-loggedIn">
  -			<map:parameter name="handler" value="sunspotdemohandler"/> 
  -			<map:redirect-to uri="sunspotdemo-loggedin"/>
  -		</map:act>
  -  	     	<map:act type="sunRise-login">
  -	      	<map:parameter name="handler" value="sunspotdemohandler"/>
  -			<map:parameter name="parameter_name" value="request:name"/>
  -			<map:parameter name="parameter_password" value="request:password"/>
  -  			<map:redirect-to uri="sunspotdemo-portal"/>
  -	      </map:act>
  -		<map:generate src="sunspotdemo/resources/free/auth.xml"/>
  -		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  -		<map:transform type="encodeURL"/>
  -		<map:serialize/>
  -	</map:match>
  -	<map:match pattern="sunspotdemofree-*">
  -		<map:act type="sunRise-loggedIn">
  -			<map:parameter name="handler" value="sunspotdemohandler"/> 
  -			<map:redirect-to uri="sunspotdemo-portal"/>
  -		</map:act>
  -		<map:generate src="sunspotdemo/resources/free/{1}.xml"/>
  -		<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  -		<map:transform type="encodeURL"/>
  -		<map:serialize/>
  -	</map:match>
  -
  -      <map:match pattern="sunspotdemo**">
  -		<map:act type="sunRise-auth">
  -			<map:parameter name="handler" value="sunspotdemohandler"/> 
  -			<map:parameter name="application" value="sunspotdemo"/> 
  -	
  -			<map:match pattern="sunspotdemoresource-save*">
  -				<map:generate src="sunspotdemo/resources/save{1}.xml"/>
  -				<map:transform type="sunShine"/>
  -				<map:transform type="sunShineInsert"/>
  -				<map:serialize type="xml"/>
  -			</map:match>
  -			<map:match pattern="sunspotdemoresource-*">
  -				<map:generate src="sunspotdemo/resources/{1}.xml"/>
  -				<map:transform type="sunShine"/>
  -				<map:transform type="sunShineInsert"/>
  -				<map:transform src="sunspotdemo/styles/portal.xsl"/>
  -				<map:serialize type="xml"/>
  -			</map:match>
  -
  -		<!-- sunlets -->
  -			<map:match pattern="sunspotdemosunlet-onlinesundn.xml"> 
  -				<map:generate src="http://www.s-und-n.de/aktuelles/news.xml"/>
  -				<map:transform src="sunspotdemo/styles/sunLet_sundnNews.xsl"/>
  -				<map:serialize type="xml"/>
  -			</map:match>
  -
  -			<map:match pattern="sunspotdemosunlet-online-*.xml"> 
  -				<map:generate src="http://p.moreover.com/cgi-local/page?index_{1}+xml"/>
  -				<map:transform src="sunspotdemo/styles/sunLet_MoreoverDotCom.xsl"/>
  -				<map:serialize type="xml"/>
  -			</map:match>
  -			<map:match pattern="sunspotdemosunlet-customnews">
  -				<map:generate src="sunspotdemo/resources/auth/sunlet-customnews.xml"/>
  -				<map:transform type="sunShine"/>
  -				<map:transform src="sunspotdemo/styles/sunLet_MoreoverDotCom.xsl"/>
  -				<map:serialize type="xml"/> 
  -			</map:match>
  -			<map:match pattern="sunspotdemosunletconf-*"> 
  -				<map:generate src="sunspotdemo/resources/auth/sunletconfig-{1}.xml"/>
  -				<map:transform type="sunShine"/>
  -				<map:transform src="sunspotdemo/styles/sunletconf.xsl"/>
  -				<map:serialize type="xml"/>
  -			</map:match>
  -
  -			<map:match pattern="sunspotdemosunlet-*.xml"> 
  -				<map:generate src="sunspotdemo/resources/auth/sunlet-{1}.xml"/>
  -				<map:serialize type="xml"/>
  -			</map:match>
  -					
  -
  -		<!-- auth sites -->
  -
  -			<map:match pattern="sunspotdemo-conf">
  -				<map:generate type="sunSpot-conf"/>
  -				<map:transform src="sunspotdemo/styles/portalconfHTML.xsl"/>
  -				<map:transform type="encodeURL"/>
  -				<map:serialize/>
  -			</map:match>
  -			<map:match pattern="sunspotdemo-adminconf">
  -				<!-- This pipeline can only be accessed if the current user is
  -                             allowed to configure the 'administration' sunLet -->
  -				<map:act type="sunSpot-auth">
  -					<map:parameter name="sunLet" value="administration"/>
  -				</map:act>
  -				<map:generate src="admin" type="sunSpot-conf"/>
  -				<map:transform src="sunspotdemo/styles/portalconfHTML.xsl"/>
  -				<map:transform type="encodeURL"/>
  -				<map:serialize/>
  -			</map:match> 
  -			<map:match pattern="sunspotdemo-sunriseconf">
  -				<!-- This pipeline can only be accessed if the current user is
  -                             allowed to configure the 'administration' sunLet -->
  -				<map:act type="sunSpot-auth">
  -					<map:parameter name="sunLet" value="administration"/>
  -				</map:act>
  -				<map:generate type="sunRise-conf"/>
  -				<map:transform src="sunspotdemo/styles/sunriseconfHTML.xsl"/>
  -				<map:transform type="encodeURL"/>
  -				<map:serialize/>
  -			</map:match> 
  -			<map:match pattern="sunspotdemo-sunriseedit">
  -				<map:generate src="user" type="sunRise-conf"/>
  -				<map:transform src="sunspotdemo/styles/sunriseeditHTML.xsl"/>
  -				<map:transform type="encodeURL"/>
  -				<map:serialize/>
  -			</map:match> 
  -			<map:match pattern="sunspotdemo-portlets">
  -				<map:generate type="sunSpot"/>
  -				<map:select type="browser">
  -					<map:when test="explorer">
  -						<map:transform src="sunspotdemo/styles/portalHTML.xsl"/>
  -					</map:when>
  -					<map:when test="netscape">
  -						<map:transform src="sunspotdemo/styles/portalHTML-Netscape.xsl"/>
  -					</map:when>
  -					<map:otherwise>
  -						<map:transform src="sunspotdemo/styles/portalHTML.xsl"/>
  -					</map:otherwise>
  -				</map:select>
  -				<map:transform type="encodeURL"/>
  -				<map:serialize/>
  -			</map:match>
  -			<map:match pattern="sunspotdemo-logout">
  -				<map:act type="sunRise-logout"/>
  -				<map:generate src="sunspotdemo/resources/auth/logout.xml"/>
  -				<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  -				<map:transform type="encodeURL"/>
  -				<map:serialize/>
  -			</map:match>
  -			<map:match pattern="sunspotdemo-*">
  -				<map:generate src="sunspotdemo/resources/auth/{1}.xml"/>
  -				<map:transform type="sunShine"/>
  -				<map:transform type="sunShineInsert"/>
  -				<map:transform src="sunspotdemo/styles/TO-html.xsl"/>
  -				<map:transform type="encodeURL"/>
  -				<map:serialize/>
  -			</map:match>
  -		</map:act>
  -    </map:match>
  -	
     </map:pipeline>
   
     <map:pipeline>   
  
  
  
  1.10      +3 -3      xml-cocoon2/src/webapp/docs/samples/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/samples.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- samples.xml	18 Feb 2002 09:10:11 -0000	1.9
  +++ samples.xml	18 Feb 2002 14:09:51 -0000	1.10
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
   
  -<!-- CVS: $Id: samples.xml,v 1.9 2002/02/18 09:10:11 cziegeler Exp $ -->
  +<!-- CVS: $Id: samples.xml,v 1.10 2002/02/18 14:09:51 cziegeler Exp $ -->
   
   <samples xmlns:xlink="http://www.w3.org/1999/xlink">
   
  @@ -59,8 +59,8 @@
   
      <sample name="Portal &amp; Authentication" href="sunspotdemoportal">
       A customizable Portal with Cocoon. In order to run this
  -    sample, you have to build Cocoon with the "-Dinclude.scratchpad.libs"
  -    option or add the cocoon-scratchpad.jar to the WEB-INF/libs directory.
  +    sample, you have to build the Cocoon webapp with the "-Dinclude.scratchpad.libs"
  +    option.
      </sample>
   
      <sample name="Sources" href="sub/">
  
  
  
  1.2       +57 -4     xml-cocoon2/tools/src/SitemapToolTask.java
  
  Index: SitemapToolTask.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/tools/src/SitemapToolTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SitemapToolTask.java	25 Jan 2002 02:31:53 -0000	1.1
  +++ SitemapToolTask.java	18 Feb 2002 14:09:51 -0000	1.2
  @@ -16,7 +16,7 @@
    * Add components to the sitemap
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/25 02:31:53 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/02/18 14:09:51 $
    */
   
   public final class SitemapToolTask extends Task {
  @@ -24,6 +24,7 @@
       private String sitemap;
       private String directory;
       private String extension;
  +    private String pipelineExtension;
   
       public void setSitemap(String sitemap) {
           this.sitemap = sitemap;
  @@ -37,6 +38,10 @@
           this.extension = extension;
       }
   
  +    public void setPipelineExtension(String extension) {
  +        this.pipelineExtension = extension;
  +    }
  +
       public void execute() throws BuildException {
           if (this.sitemap == null) {
               throw new BuildException("sitemap attribute is required", location);
  @@ -51,7 +56,10 @@
   
           try {
               // process recursive
  -            this.process(new File(this.directory), this.extension, this.sitemap);
  +            this.process(new File(this.directory),
  +                         this.extension,
  +                         this.pipelineExtension,
  +                         this.sitemap);
           } catch (IOException ioe) {
               throw new BuildException("IOException: " + ioe);
           }
  @@ -62,6 +70,7 @@
        */
       private void process(final File   directoryFile,
                            final String ext,
  +                         final String pipeExt,
                            final String sitemapLocation)
       throws IOException, BuildException {
   
  @@ -70,7 +79,7 @@
           for(int i = 0; i < files.length; i++) {
   
               if (files[i].isDirectory() == true) {
  -                this.process(files[i], ext, sitemapLocation);
  +                this.process(files[i], ext, pipeExt, sitemapLocation);
               } else {
   
                   if (files[i].getName().endsWith("."+ext) == true) {
  @@ -114,7 +123,21 @@
                           if (className == null) {
                               throw new BuildException("componentClass property is required in file " + files[i].getAbsolutePath(), location);
                           }
  -
  +                        if (configuration != null && configuration.equals("START")) {
  +                            boolean foundEnd = false;
  +                            configuration = "";
  +                            while (foundEnd == false && st.hasMoreElements() ) {
  +                                final String confline = (String)st.nextElement();
  +                                if ("END".equals(confline)) {
  +                                    foundEnd = true;
  +                                } else {
  +                                    configuration = configuration + confline + "\n";
  +                                }
  +                            }
  +                            if (foundEnd == false) {
  +                                throw new BuildException("Multi-Line configuration must end with 'END'");
  +                            }
  +                        }
                           this.add(sitemapLocation,
                                    category,
                                    componentName,
  @@ -123,9 +146,39 @@
                                    label,
                                    mimeType);
                       }
  +                } else if ( files[i].getName().endsWith("."+pipeExt) ) {
  +                    System.out.println("Reading: " + files[i].getAbsolutePath());
  +                    final String data = this.load(files[i].getAbsolutePath());
  +                    this.addPipeline(sitemapLocation, data);
  +                }
  +            }
  +        }
  +    }
  +
  +    /**
  +     * Add pipelines to sitemap
  +     */
  +    private void addPipeline(final String sitemapLocation,
  +                             final String pipelineData)
  +    throws IOException {
  +        final String data = load( sitemapLocation );
  +
  +        // first search if pipeline already present:
  +        if ( data.indexOf( pipelineData ) == -1 ) {
  +            int pos = data.indexOf( "<map:pipelines" );
  +            if (pos != -1) {
  +                pos = data.indexOf( ">", pos);
  +
  +                if (pos != -1) {
  +                    StringBuffer buffer = new StringBuffer( data.substring( 0, pos+1 ) )
  +                                .append( "\n\n" )
  +                                .append( pipelineData )
  +                                .append( data.substring( pos+1 ) );
  +                    this.save( sitemapLocation, buffer.toString() );
                   }
               }
           }
  +
       }
   
       /**
  
  
  

----------------------------------------------------------------------
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