You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Brian Topping <to...@digidemic.com> on 2002/06/08 15:55:17 UTC

Tokenized parameter semantics

Sitemap wizards, I need a semantic question about tokenization in parameters answered.

Of the two following pipelines, which do you consider "correct"?  I'm not asking how it works today, I'm asking how it *should* work.  It's a gray area.  

The only token we care about is from the outside wildcard matcher, and all references to a token are of this matcher:

<map:match pattern="xyz/*.html">
  <map:act type="myAct">
    <map:parameter name="arg1" value="foo/{../1}"/>
    <map:generate src="{../1}"/>
    ...
  </map:act>
</map:match>

  ---- or ----

<map:match pattern="xyz/*.html">
  <map:act type="myAct">
    <map:parameter name="arg1" value="foo/{1}"/>
    <map:generate src="{../1}"/>
    ...
  </map:act>
</map:match>
 
The difference is in the level that the parameter "arg1" is referenced from.  It's a parameter, so should it be referenced relative to the caller or relative to the child parameters that it is embedded with. 

Thanks,

-b

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


Re: Tokenized parameter semantics

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 08.Jun.2002 -- 09:55 AM, Brian Topping wrote:
> Sitemap wizards, I need a semantic question about tokenization in parameters answered.
> 
> Of the two following pipelines, which do you consider "correct"?  I'm not asking how it works today, I'm asking how it *should* work.  It's a gray area.  

<snip/>
 
> <map:match pattern="xyz/*.html">
>   <map:act type="myAct">
>     <map:parameter name="arg1" value="foo/{1}"/>
>     <map:generate src="{../1}"/>
>     ...
>   </map:act>
> </map:match>
>  
> The difference is in the level that the parameter "arg1" is referenced from.  It's a parameter, so should it be referenced relative to the caller or relative to the child parameters that it is embedded with. 

Right. Since the action is nested inside the matcher, and the generator is nested
inside the action, levels have to be different by one "../". Parameters are not
considered to be nested but belong to the start element.

Question: if it was different, how would you reference a value set by the action?

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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