Mark,

> 
> Question 1:
> 
> Consider the two following map components, noting the position of {1}:
> 
> This one works:
> 
> <map:match pattern="protected/**">
>     <map:aggregate element="site">
>        <map:part src="cocoon:/{1}-screen.xml" element="screen"/>
>        <map:part src="docs/lookandfeel.xml"
>                  element="lookandfeel"/>
>     </map:aggregate>
>     <map:act type="session-is-valid">
>       <map:act type="session-validator">
>         <map:parameter name="descriptor"
>              value="context://mmsc//descriptors/login-params.xml"/>
>         <map:parameter name="validate"
>              value="username"/>
>         <map:transform type="i18n">
>            <map:parameter name="src" value="docs/translations.xml"/>
>         </map:transform>
>         <map:serialize/>
>       </map:act>
>       <map:redirect-to session="true" uri="login"/>
>     </map:act>
>     <map:redirect-to session="false" uri="startsession"/>
> </map:match>
> 
> This one does not bind the * to the {1} parameter. Why?
> 
> <map:match pattern="protected/**">
>     <map:act type="session-is-valid">
>       <map:act type="session-validator">
>         <map:parameter name="descriptor"
>            value="context://mmsc//descriptors/login-params.xml"/>
>         <map:parameter name="validate"
>            value="username"/>
>         <map:aggregate element="site">
>            <map:part src="cocoon:/{1}-screen.xml" element="screen"/>

Use {../../1}. Actions also can return parameters  - but you need parameter from the 
matcher.


>            <map:part src="docs/lookandfeel.xml" element="lookandfeel"/>
>         </map:aggregate>
>         <map:transform type="i18n">
>           <map:parameter name="src" value="docs/translations.xml"/>
>         </map:transform>
>         <map:serialize/>
>       </map:act>
>       <map:redirect-to session="true" uri="login"/>
>     </map:act>
>     <map:redirect-to session="false" uri="startsession"/>
> </map:match>
> 
> 
> Question 2:
>       In the above example what would be the difference in using a single '*' 
> instead of '**', I tried both and they seem to do the same thing.

* matches files, ** matches paths. The difference is that * do not matches "/".


> 
> Question 3:
>        In the above example the line:
> 
> <map:parameter name="descriptor"
>               value="context://mmsc//descriptors/login-params.xml"/>
> 
> The value string as to have the prefix :'//mmsc//' which is actually the 
> root application name. I don't think it should have to appear anywhere 
> in this sitemap. Why can't I say:
> 
> <map:parameter name="descriptor"
>      value="descriptors/login-params.xml"/>
> 
> or is there something like 'context:' that gives me
> 'context://mmsc//' ?
> 
> 
> Thanks,
> 
> -- 
> Mark Miller
> Web Architect
> Logica
> 819-3646
> 
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to