cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudheendra Hebbagilu <>
Subject RE: XSL selection by GET request
Date Tue, 23 Jan 2001 18:10:43 GMT
This is how I select one of the stylesheet depending on a parameter. If this
is what u r looking for 
<?xml version="1.0" encoding="UTF-8"?>
<?cocoon-process type="xsp"?>
<xsp:page language="java" xmlns:xsp="">
String file = &quot;/datasheet/pdf.xsl&quot;;
String param = null;
param = (String)request.getParameter(&quot;type&quot;);
if (param != null &amp;&amp; !param.equals(&quot;&quot;)){
      file = &quot;/datasheet/html.xsl&quot;;
<xsp:pi target="cocoon-process">type=&quot;xslt&quot;</xsp:pi>
<xsp:pi target="xml-stylesheet">href=&quot;<xsp:expr>file</xsp:expr>&quot;

Depending on a url parameter called type , I select one of the stylesheet.


> how do I get the same XML document either as a HTML page
> or PDF file using a parameter in the GET request?

View raw message