cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: variable substitution in @type attributes
Date Wed, 04 Feb 2004 14:27:23 GMT
that's what i feared - but somehow i couldn't come up with the right 
keywords for my search. Care to give me a hint?

thanks
Jorg

Carsten Ziegeler wrote:

> This was discussed several times, please have a look in the archives.
> 
> HTH
> Carsten
> 
> 
>>-----Original Message-----
>>From: news [mailto:news@sea.gmane.org]On Behalf Of Jorg Heymans
>>Sent: Wednesday, February 04, 2004 3:11 PM
>>To: dev@cocoon.apache.org
>>Subject: variable substitution in @type attributes
>>
>>
>>Carrying the discussion over from users@
>>Why is variable substituion not allowed in @type attributes ?
>>(or: is there a better way to translate below pseudo-syntax into real 
>>syntax?)
>>
>> >>
>> >> Imagine Tuomo's usecase a bit more extended
>> >>
>> >> <map:match pattern="*.*">
>> >>    <map:generate src="{1}.{2}"/>
>> >>    <map:transform type="{2}"/>
>> >>    <map:serialize type="{2}"/>
>> >> </map:match>
>> >>
>> >> Using the old syntax this becomes
>> >>
>> >> <map:match pattern="*.*">
>> >>     <map:select type="parameter">
>> >>       <map:parameter name="parameter-selector-test" value="{2}"/>
>> >> <!-- for each possible file extension you need to have this block -->
>> >>       <map:when test="svg">
>> >>         <map:generate src="{1}.{2}"/>
>> >>         <map:transform type="svg"/>
>> >>         <map:serialize type="svg"/>
>> >>       </map:when>      	
>> >>       <map:when test="video">
>> >>         <map:generate src="{1}.{2}"/>
>> >>         <map:transform type="video"/>
>> >>         <map:serialize type="video"/>
>> >>       </map:when>
>> >>       ......
>> >>     </map:select>
>> >> </map:match>
>> >>
>>
>>
>>
>>
> 


Mime
View raw message