From: news [mailto:[EMAIL PROTECTED] > > This had nothing to do with setting parameters but with > variables in > > @type attributes. AFAIK you can't set the type of a > pipeline component > > (generators, transformers, serializers) using a variable or > an input > > module. > > > I see now. But it does make sense to have this functionality IMHO. > > 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> > > Or is there a better way to translate above usecase to sitemap syntax?
Not that I know. But also don't forget that you can't set default values. If it is important for anyone check the archives for the reasons. I guess this issue hasn't come up the first time. If you don't find anything or you're not satisfied with the explanations you can ask on dev@ for the reasons why variable substituion is not allowed in @type attributes. Best, Reinhard --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
