While we're on this topic... I've had reason in the past to change the QueryString module so you can specify the 'name' in the name=value pair.
Something like.. PerlSetVar AxStyleChooserQueryStringKey mystyle [I hate that the var name is this long, but it's clear, any other ideas?] So then requests could be made using *.xsp?mystyle=style1 The reasoning was that [albeit rare], style= was already takin for something else. The same theory applies to StyleChooser by cookies Would this be something that could make it into the source (ala submitting a patch), or just a 'silly feature'? -=Chris > -----Original Message----- > From: Kip Hampton [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 10:04 AM > To: Nigel Peck; [EMAIL PROTECTED]; Nigel Peck > Cc: [EMAIL PROTECTED] > Subject: Re: Style Sheet Choosing > > > At 03:01 PM 07/11/2002 +0100, Nigel Peck wrote: > >How can I use a different XPS stylesheet based on a form > >element/querystring? > > > >I've looked at Apache::AxKit::StyleChooser::QueryString but I'm not > >sure how to make the stylesheets exclusive rather than all of them > >getting applied. > > In http.conf or .htaccess: > > # add the stylechooser plugin > AxAddPlugin Apache::AxKit::StyleChooser::QueryString > > # set up the named styles (don't forget to set a "#default" one) > <AxStyleName "#default"> > AxAddProcessor application/x-xpathscript /path/to/fallback.xps > </AxStyleName> > <AxStyleName "style1"> > AxAddProcessor application/x-xpathscript /path/to/style1.xps > </AxStyleName> > <AxStyleName "style2"> > AxAddProcessor application/x-xpathscript /path/to/style2.xps > </AxStyleName> > > Stop and restart the server. > > After that, requests to > http://yerserver.tld/foo.xml?style=style1 will be > transformed with the style1.xps stylesheet, > http://yerserver.tld/foo.xml?style=style1 with the style2.xsp > stylesheet, > and those not specifying a style in the QS will be transformed with > fallback.xps. > > HTH, > -kip > > > Kip Hampton > Perl and XML: http://xml.com/pub/q/perlxml > AxKit: http://axkit.org/ > > Join Us In San Diego! > http://conferences.oreillynet.com/os2002/ > http://conferences.oreillynet.com/cs/os2002/view/e_sess/2533 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
