Hey Barbara,
thanks for your suggestion, unfortunately it won't work for us as sending a style all
the time would require a massive rewrite of our system which generates all the urls
automatically and it is really only occassional special cases we need to catch with a
specified style
thanks though!
Jo
At 8:30 AM +0200 30/7/02, Barbara Post wrote:
>Hello,
>
>is this ok for your problem ? But if "style" is not specified this wouldn't
>be ok. So you would have to specify a default value anyway when
>submitting...
>
><map:match pattern="**.xml">
> <map:generate src="{1}.xml"/>
> <map:act type="request">
> <map:parameter name="parameters" value="true"/>
> <map:transform src="{style}.xsl"/>
> <map:serialize ... />
></map:act>
></map:match>
>
>Babs
>----- Original Message -----
>From: Jo Bourne <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, July 30, 2002 4:39 AM
>Subject: using request selector to choose xsl
>
>
>> Hi,
>>
>> I currently have a request selector working to choose which xsl to use
>based on a query string in the request. I built this using the method
>recommend repeatedly in the mailing list archives and it works but I would
>like it to simply test whether there is a style paramater and use it if
>there is, or otherwise use the default. Having to specify each possible
>stylesheet in a seperate case is annoying and wasteful. Is there another way
>to do this?
>>
>> thanks in advance.
>> Jo
>>
>> PS. here is an example of what I am using at present
>>
>> <map:match pattern="**.xml">
>> <map:generate src="{1}.xml"/>
>> <map:select type="request">
>> <map:parameter name="parameter-name" value="style"/>
>> <map:when test="special_one.xsl">
>> <map:transform src="special_one.xsl"/>
>> </map:when>
>> <map:when test="special_two.xsl">
>> <map:transform src="special_two.xsl"/>
>> </map:when>
>> <map:when test="special_three.xsl">
>> <map:transform src="special_three.xsl"/>
>> </map:when>
>> <map:otherwise>
>> <map:transform src="default.xsl"/>
>> </map:otherwise>
>> </map:select>
>> <map:serialize/>
>> </map:match>
>>
>> ---------------------------------------------------------------------
>> Please check that your question has not already been answered in the
>> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>>
>> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>> For additional commands, e-mail: <[EMAIL PROTECTED]>
>>
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail: <[EMAIL PROTECTED]>
>For additional commands, e-mail: <[EMAIL PROTECTED]>
--
Jo Bourne
Virtual Artists Pty Ltd
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>