This was discussed several times, please have a look in the archives. HTH Carsten
> -----Original Message----- > From: news [mailto:[EMAIL PROTECTED] Behalf Of Jorg Heymans > Sent: Wednesday, February 04, 2004 3:11 PM > To: [EMAIL PROTECTED] > 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> > >> > > > >
