cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject variable substitution in @type attributes
Date Wed, 04 Feb 2004 14:11:05 GMT
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