cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/authentication-fw/samples/stylesheets authenticate.xsl simple-page2html.xsl
Date Sat, 03 May 2003 16:18:00 GMT
vgritsenko    2003/05/03 09:17:59

  Modified:    src/blocks/authentication-fw/samples sitemap.xmap
               src/blocks/authentication-fw/samples/stylesheets
                        authenticate.xsl simple-page2html.xsl
  Log:
  Fix line endings
  
  Revision  Changes    Path
  1.2       +110 -110  cocoon-2.1/src/blocks/authentication-fw/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/samples/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap	9 Mar 2003 00:02:23 -0000	1.1
  +++ sitemap.xmap	3 May 2003 16:17:58 -0000	1.2
  @@ -1,110 +1,110 @@
  -<?xml version="1.0"?>
  -
  -<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  -<!-- =========================== Components ================================ -->
  -
  - <map:components>
  -
  -  <map:generators default="file"/>
  -  <map:transformers default="xslt"/>
  -  <map:readers default="resource"/>
  -  <map:serializers default="html"/>
  -  <map:matchers default="wildcard"/>
  -  <map:selectors default="browser"/>
  - </map:components>
  -
  -
  -<!-- =========================== Pipelines ================================= -->
  -
  - <map:pipelines>
  -  <map:component-configurations>
  -  <authentication-manager>
  -    <handlers>
  -      <handler name="demohandler">
  -		<redirect-to uri="cocoon:/login"/>
  -		<authentication uri="cocoon:raw:/authenticate"/>
  -      </handler>
  -     </handlers>
  -   </authentication-manager>
  -  </map:component-configurations>
  -
  -  <map:pipeline>
  -
  -      <map:match pattern="">
  -        <map:redirect-to uri="login"/>
  -      </map:match>
  -
  -      <!-- ================= -->
  -      <!-- Simple login page -->
  -      <!-- ================= -->
  -      <map:match pattern="login">
  -        <!-- if we are already logged in, redirect to the protected document -->
  -		<map:act type="auth-loggedIn">
  -			<map:parameter name="handler" value="demohandler"/> 
  -			<map:redirect-to uri="protected"/>
  -		</map:act> 
  -            <map:generate src="docs/login.xml"/>
  -       	<map:transform src="stylesheets/simple-page2html.xsl"/>
  -		<map:transform type="encodeURL"/>
  -        <map:serialize/>
  -      </map:match>
  -
  -      <!-- ========================================= -->
  -      <!-- Form target which performs auth service   -->
  -      <!-- ========================================= -->
  -      <map:match pattern="do-login">
  -            <!-- try to login -->
  -  	     	<map:act type="auth-login">
  -	      	<map:parameter name="handler" value="demohandler"/>
  -			<map:parameter name="parameter_name" value="{request-param:username}"/>
  -  			<map:redirect-to uri="protected"/>
  -	      </map:act>
  -            <!-- something was wrong, try it again -->
  -            <map:redirect-to uri="login"/>
  -      </map:match>
  -
  -      <!-- ================ -->
  -      <!-- Protected area   -->
  -      <!-- ================ -->
  -      <map:match pattern="protected">
  -		<map:act type="auth-protect">
  -			<map:parameter name="handler" value="demohandler"/> 
  -
  -                <map:generate src="docs/protected.xml"/>
  -         	    <map:transform src="stylesheets/simple-page2html.xsl"/>
  -	    	    <map:transform type="encodeURL"/>
  -                <map:serialize/>
  -            </map:act>
  -            <!-- something was wrong, redirect to login page -->
  -            <map:redirect-to uri="login"/>
  -      </map:match>
  -
  -      <!-- ========================================= -->
  -      <!-- Logout link which invalidates the session -->
  -      <!-- ========================================= -->
  -      <map:match pattern="do-logout">
  -		<map:act type="auth-protect">
  -			<map:parameter name="handler" value="demohandler"/> 
  -
  -   		       <map:act type="auth-logout"/>
  -            </map:act>
  -            <map:redirect-to uri="login"/>
  -      </map:match>
  -
  -  </map:pipeline>
  -
  -  <map:pipeline internal-only="true">
  -    <!-- This is the authentication respource -->
  -	<map:match pattern="authenticate">
  -  	    <map:generate src="docs/userlist.xml"/>
  -	    <map:transform src="stylesheets/authenticate.xsl">
  -   	        <map:parameter name="use-request-parameters" value="true"/>
  -          </map:transform>
  -	    <map:serialize type="xml"/>
  -	</map:match>
  -  </map:pipeline>
  -
  - </map:pipelines>
  -
  -</map:sitemap>
  -
  +<?xml version="1.0"?>
  +
  +<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  +<!-- =========================== Components ================================ -->
  +
  + <map:components>
  +
  +  <map:generators default="file"/>
  +  <map:transformers default="xslt"/>
  +  <map:readers default="resource"/>
  +  <map:serializers default="html"/>
  +  <map:matchers default="wildcard"/>
  +  <map:selectors default="browser"/>
  + </map:components>
  +
  +
  +<!-- =========================== Pipelines ================================= -->
  +
  + <map:pipelines>
  +  <map:component-configurations>
  +  <authentication-manager>
  +    <handlers>
  +      <handler name="demohandler">
  +		<redirect-to uri="cocoon:/login"/>
  +		<authentication uri="cocoon:raw:/authenticate"/>
  +      </handler>
  +     </handlers>
  +   </authentication-manager>
  +  </map:component-configurations>
  +
  +  <map:pipeline>
  +
  +      <map:match pattern="">
  +        <map:redirect-to uri="login"/>
  +      </map:match>
  +
  +      <!-- ================= -->
  +      <!-- Simple login page -->
  +      <!-- ================= -->
  +      <map:match pattern="login">
  +        <!-- if we are already logged in, redirect to the protected document -->
  +		<map:act type="auth-loggedIn">
  +			<map:parameter name="handler" value="demohandler"/> 
  +			<map:redirect-to uri="protected"/>
  +		</map:act> 
  +            <map:generate src="docs/login.xml"/>
  +       	<map:transform src="stylesheets/simple-page2html.xsl"/>
  +		<map:transform type="encodeURL"/>
  +        <map:serialize/>
  +      </map:match>
  +
  +      <!-- ========================================= -->
  +      <!-- Form target which performs auth service   -->
  +      <!-- ========================================= -->
  +      <map:match pattern="do-login">
  +            <!-- try to login -->
  +  	     	<map:act type="auth-login">
  +	      	<map:parameter name="handler" value="demohandler"/>
  +			<map:parameter name="parameter_name" value="{request-param:username}"/>
  +  			<map:redirect-to uri="protected"/>
  +	      </map:act>
  +            <!-- something was wrong, try it again -->
  +            <map:redirect-to uri="login"/>
  +      </map:match>
  +
  +      <!-- ================ -->
  +      <!-- Protected area   -->
  +      <!-- ================ -->
  +      <map:match pattern="protected">
  +		<map:act type="auth-protect">
  +			<map:parameter name="handler" value="demohandler"/> 
  +
  +                <map:generate src="docs/protected.xml"/>
  +         	    <map:transform src="stylesheets/simple-page2html.xsl"/>
  +	    	    <map:transform type="encodeURL"/>
  +                <map:serialize/>
  +            </map:act>
  +            <!-- something was wrong, redirect to login page -->
  +            <map:redirect-to uri="login"/>
  +      </map:match>
  +
  +      <!-- ========================================= -->
  +      <!-- Logout link which invalidates the session -->
  +      <!-- ========================================= -->
  +      <map:match pattern="do-logout">
  +		<map:act type="auth-protect">
  +			<map:parameter name="handler" value="demohandler"/> 
  +
  +   		       <map:act type="auth-logout"/>
  +            </map:act>
  +            <map:redirect-to uri="login"/>
  +      </map:match>
  +
  +  </map:pipeline>
  +
  +  <map:pipeline internal-only="true">
  +    <!-- This is the authentication respource -->
  +	<map:match pattern="authenticate">
  +  	    <map:generate src="docs/userlist.xml"/>
  +	    <map:transform src="stylesheets/authenticate.xsl">
  +   	        <map:parameter name="use-request-parameters" value="true"/>
  +          </map:transform>
  +	    <map:serialize type="xml"/>
  +	</map:match>
  +  </map:pipeline>
  +
  + </map:pipelines>
  +
  +</map:sitemap>
  +
  
  
  
  1.2       +33 -33    cocoon-2.1/src/blocks/authentication-fw/samples/stylesheets/authenticate.xsl
  
  Index: authenticate.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/samples/stylesheets/authenticate.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- authenticate.xsl	9 Mar 2003 00:02:24 -0000	1.1
  +++ authenticate.xsl	3 May 2003 16:17:59 -0000	1.2
  @@ -1,33 +1,33 @@
  -<?xml version="1.0"?>
  -<!-- $Id$ 
  -
  --->
  -
  -<xsl:stylesheet version="1.0" 
  -                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -
  -
  -<!-- Get the name from the request paramter -->
  -<xsl:param name="name"/>
  -
  -<xsl:template match="authentication">
  -  <authentication>
  -	<xsl:apply-templates select="users"/>
  -  </authentication>
  -</xsl:template>
  -
  -
  -<xsl:template match="users">
  -    <xsl:apply-templates select="user"/>
  -</xsl:template>
  -
  -
  -<xsl:template match="user">
  -    <!-- Compare the name of the user -->
  -    <xsl:if test="normalize-space(name) = $name">
  -        <!-- found, so create the ID -->
  -        <ID><xsl:value-of select="name"/></ID>
  -    </xsl:if>
  -</xsl:template>
  -
  -</xsl:stylesheet>
  +<?xml version="1.0"?>
  +<!-- $Id$ 
  +
  +-->
  +
  +<xsl:stylesheet version="1.0" 
  +                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  +
  +
  +<!-- Get the name from the request paramter -->
  +<xsl:param name="name"/>
  +
  +<xsl:template match="authentication">
  +  <authentication>
  +	<xsl:apply-templates select="users"/>
  +  </authentication>
  +</xsl:template>
  +
  +
  +<xsl:template match="users">
  +    <xsl:apply-templates select="user"/>
  +</xsl:template>
  +
  +
  +<xsl:template match="user">
  +    <!-- Compare the name of the user -->
  +    <xsl:if test="normalize-space(name) = $name">
  +        <!-- found, so create the ID -->
  +        <ID><xsl:value-of select="name"/></ID>
  +    </xsl:if>
  +</xsl:template>
  +
  +</xsl:stylesheet>
  
  
  
  1.2       +58 -58    cocoon-2.1/src/blocks/authentication-fw/samples/stylesheets/simple-page2html.xsl
  
  Index: simple-page2html.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/samples/stylesheets/simple-page2html.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- simple-page2html.xsl	9 Mar 2003 00:02:24 -0000	1.1
  +++ simple-page2html.xsl	3 May 2003 16:17:59 -0000	1.2
  @@ -1,58 +1,58 @@
  -<?xml version="1.0"?>
  -
  -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  -
  -  <xsl:template match="page">
  -    <html>
  -      <head>
  -        <title>
  -          <xsl:value-of select="title"/>
  -        </title>
  -        <META content="0" http-equiv="expires"/>
  -        <META content="nocache" http-equiv="pragma"/>
  -      </head>
  -      <body bgcolor="white" alink="red" link="blue" vlink="blue">
  -        <xsl:apply-templates/>
  -      </body>
  -    </html>
  -  </xsl:template>
  -
  -  <xsl:template match="title">
  -    <h2 style="color: navy; text-align: center">
  -      <xsl:apply-templates/>
  -    </h2>
  -  </xsl:template>
  -
  -  <xsl:template match="para">
  -    <p align="center">
  -      <i><xsl:apply-templates/></i>
  -    </p>
  -  </xsl:template>
  -
  -  <xsl:template match="form">
  -    <form method="POST" action="{@target}">
  -      <xsl:apply-templates/>
  -    </form>
  -  </xsl:template>
  -
  -  <xsl:template match="input">
  -    <center>
  -      <xsl:value-of select="@title"/>
  -      <input type="{@type}" name="{@name}" value="{.}"/>
  -    </center><br/>
  -  </xsl:template>
  -
  -  <xsl:template match="linkbar">
  -    <center>
  -      [
  -      <a href="login"> login </a>
  -      |
  -      <a href="protected"> protected </a>
  -      |
  -      <a href="do-logout"> logout </a>
  -      ]
  -    </center>
  -  </xsl:template>
  -
  -</xsl:stylesheet>
  -<!-- vim: set et ts=2 sw=2: -->
  +<?xml version="1.0"?>
  +
  +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  +
  +  <xsl:template match="page">
  +    <html>
  +      <head>
  +        <title>
  +          <xsl:value-of select="title"/>
  +        </title>
  +        <META content="0" http-equiv="expires"/>
  +        <META content="nocache" http-equiv="pragma"/>
  +      </head>
  +      <body bgcolor="white" alink="red" link="blue" vlink="blue">
  +        <xsl:apply-templates/>
  +      </body>
  +    </html>
  +  </xsl:template>
  +
  +  <xsl:template match="title">
  +    <h2 style="color: navy; text-align: center">
  +      <xsl:apply-templates/>
  +    </h2>
  +  </xsl:template>
  +
  +  <xsl:template match="para">
  +    <p align="center">
  +      <i><xsl:apply-templates/></i>
  +    </p>
  +  </xsl:template>
  +
  +  <xsl:template match="form">
  +    <form method="POST" action="{@target}">
  +      <xsl:apply-templates/>
  +    </form>
  +  </xsl:template>
  +
  +  <xsl:template match="input">
  +    <center>
  +      <xsl:value-of select="@title"/>
  +      <input type="{@type}" name="{@name}" value="{.}"/>
  +    </center><br/>
  +  </xsl:template>
  +
  +  <xsl:template match="linkbar">
  +    <center>
  +      [
  +      <a href="login"> login </a>
  +      |
  +      <a href="protected"> protected </a>
  +      |
  +      <a href="do-logout"> logout </a>
  +      ]
  +    </center>
  +  </xsl:template>
  +
  +</xsl:stylesheet>
  +<!-- vim: set et ts=2 sw=2: -->
  
  
  

Mime
View raw message