On 8/17/06, Andreas Hartmann <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> We can fix that for 1.3, and pass the improvements to Cocoon.  How
> about changing the wildcard matcher so it can name variables?
>      <!--
> /lenyabody-{rendertype}/{publication-id}/{area}/{doctype}/{url} -->
>      <map:match
> pattern="lenyabody-%rendertype%/%pub%/%area%/%doctype%/%%documentpath%%">


Just a random thought - another option might be to use "named matchers",
maybe with default values for parameters:

<map:match name="content">
   <map:param name="pubId" default="{page-envelope:publication-id}"/>
   <map:param name="uuid" default="{page-envelope:document-uuid}"/>
   <map:generate src="lenyadoc://{$pubId}/{$uuid} ..."
   ...
</map:match>

<map:generate type="matcher" src="content">
   <map:parameter name="pubId" value="{1}"/>
   <map:parameter name="uuid" value="{2}"/>
</map:generate>
<map:transform ...

I do not understand.  How does this apply to naming parts of the URL?
The code in your example does not have a pattern.for the matching.

http://myserver/mypub/module/param1/param2/documentpath/doc.html
  reaches a 1.3 Module as:
module/param1/param2/documentpath/doc.html
  so use a normal match could be:
<map:match pattern="*/*/*/**.html">
  The same match with the % syntax could be:
<map:match pattern="*/%par1%/%par2/%%documentPathAndID%%.html">
{1} = "module"  (unneeded, so use numbered syntax)
{par1} = "param1"
{par2} = "param2"
{documentPathAndID} = "documentpath/doc"

solprovider

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

Reply via email to