cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter.Urba...@mediacenter.nl
Subject Betr.: Re: Betr.: Re: Betr.: Re: Betr.: authentication-fw
Date Mon, 02 May 2005 21:16:28 GMT





Andre Juffer <ajuffer@sun3.oulu.fi> wrote on 02-05-2005 22:36:53:

> Peter.Urbanus@mediacenter.nl wrote:
> >
> >
> > In particular, what happens if you add the extra match <map:match
> > type="request-parameter" pattern="userid"> into your simplified
> > "authenticate" pipeline above?
>
>      <map:match pattern="authenticate">
>        <map:match type="request-parameter" pattern="userid">
>          <map:generate src="/tmp/authenticate.xml" />
>          <map:serialize type="xml" />
>        </map:match>
>      </map:match>
>
>
> Authentication works. But the same file is being used of course
> (/tmp/authenticate.xml), so it should work.

Agreed. I just wanted to exclude the possibility that this match didn't
"match".
And what happens if you add whitespace to your /tmp/authenticate.xml? In my
setup, I can add all the whitespace I like and it still works. So, assuming
it's not the whitespace, we have two pipelines

<map:match pattern="authenticate.xxx">
  <map:match type="request-parameter" pattern="userid">
    <map:generate src="/tmp/authenticate.xml" />
    <map:serialize type="xml" />
   </map:match>
</map:match>

and

<map:match pattern="authenticate.xxx">
   <map:match type="request-parameter" pattern="userid">
     <map:generate src="cocoon://persistence/get-party?email={1}" />
     <map:transform src="docs/xsl/authenticate.xsl">
       <map:parameter name="use-request-parameters" value="true" />
     </map:transform>
     <map:serialize type="xml" />
   </map:match>
</map:match>

First one works, second one doesn't.
Time to look at authenticate.xsl then? I would like to have a look at it.

There is one other thing you could do: use the LogTransformer to see the
SAX events. like this:

<map:match pattern="authenticate.xxx">
  <map:match type="request-parameter" pattern="userid">
    <map:generate src="cocoon://persistence/get-party?email={1}" />
    <map:transform src="docs/xsl/authenticate.xsl">
      <map:parameter name="use-request-parameters" value="true" />
    </map:transform>
    <map:transform type="log">
      <map:parameter name="logfile" value="authenticate.log"/>
      <map:parameter name="append" value="yes"/>
    </map:transform>
    <map:serialize type="xml" />
  </map:match>
</map:match>

Regards, Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message