cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: Flowscript and XSLT
Date Wed, 21 Apr 2004 20:18:32 GMT

Have you tried replacing the map:aggregate with map:generate? Does it 
return a result?
And what happens if you request "registerd_user_area"?

--
Reinhard



beyaNet Consultancy wrote:

> Hi,
> in the following sitemap snippet:
>
>             <map:match pattern="registerd_user_area">
>                 <!--<map:act type="auth-protect">
>                     <map:parameter name="handler" 
> value="beyarecords"/>-->
>                         <map:aggregate element="home">
>                             <map:part src="cocoon:/support/menu"/>
>                                 <map:part 
> src="cocoon:/support/contract-summary"/>
>                                     <map:part 
> src="context://beyarecords/content/adv-xyz-01.xml"/>
>                                         <map:part 
> src="cocoon:/support/banner"/>
>                         </map:aggregate>
>                        
>                         <map:transform type="xslt" 
> src="style/home-page.xsl"/>
>                     <map:call resource="serialize"/>
>                 <!--</map:act>-->
>             </map:match>
>
> the map:part section which make reference to src="cocoon:/...." all 
> make process xsp server pages, for example:
>
>             <map:match pattern="support/menu">
>                         <map:generate type="serverpages" 
> src="xsp/menu.xsp"/>
>                             <map:call resource="serialize"/>
>             </map:match>
>
> The problem that I am experiencing is that when this pattern, 
> registerd_user_area,  is called from a flowscript:
>
> function login() {
>
>     while (user == null) {
>        
>         cocoon.sendPageAndWait("login.jx", {"msg":msg});
>         try {
>             user = newUser.getUser(cocoon.request.get("username"), 
> cocoon.request.get("password") );
>             break;
>         }catch(e){
>             msg = "The username password combination you entered does 
> not exist. Please retry.";
>         }
>     }
>     
>     cocoon.redirectTo("registerd_user_area"); ----- HERE THE CALL IS MADE
> }
>
> the parts of the aggregation which process serverpages are not 
> rendered to the screen, i.e. they appear blank. Why?
>
> Peter
> On 21 Apr 2004, at 11:10, Reinhard Poetz wrote:
>
>> beyaNet Consultancy wrote:
>>
>>> Hi,
>>>
>>> 1. is it possible to apply a stylesheet to a *.jx file like you can 
>>> to xsp?
>>>
>>> <map:match pattern="*.jx">
>>> <map:generate type="jx" src="jx/{1}.jx"/>
>>> <map:transform type="xslt" src="style/main.xsl"/>
>>> <map:serialize type="xhtml"/>
>>> </map:match>
>>>
>>> If not, why? Surely not being able to apply a stylesheet to any 
>>> document runs away from the xml/xslt ethos of cocoon!
>>>
>>> 2. can you aggregate *.jx files
>>>
>>> <map:match pattern="registerd">
>>> <map:aggregate element="main">
>>> <map:part src="context://beyarecords/jx/login.jx"/>
>>> <map:part src="cocoon:/support/contract-summary"/>
>>> <map:part src="context://beyarecords/content/adv-xyz-01.xml"/>
>>> <map:part src="cocoon:/support/banner"/>
>>> </map:aggregate>
>>>
>>>
>>> <map:transform type="xslt" src="style/home-page.xsl"/>
>>> <map:call resource="serialize"/>
>>> </map:match>
>>>
>>> In the above example, the login.jx file is not rendered to the 
>>> screen, why?
>>
>>
>>
>> If you use "context:/" the physical available file is read and *not* 
>> the content of an URI provided by Cocoon.
>>
>> -- 
>> Reinhard
>

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


Mime
View raw message