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]

Reply via email to