cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Raiczyk <alejand...@technisys.com.ar>
Subject XSP
Date Fri, 25 Aug 2000 18:14:13 GMT
How can I set the stylesheet in a XML page on runtime ?

I tried this:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">

	<xsp:logic><![CDATA[
		String idioma = request.getParameter("idioma");
		if (idioma.equals("ingles")){
		]]>
		<P>Ingles</P>
		<?xml-stylesheet href="prueba1.xsl" type="text/xsl"?>
		}
		else{
		<P>Espanol</P>
		<?xml-stylesheet href="espanol.xsl" type="text/xsl"?>
		}
	</xsp:logic>

<page>
.
.
</page>
</xsp:page>

but it gives this exception:

java.lang.Exception: XSP Java Compiler: Compilation failed for _prueba1.java
25: Undefined variable or class name: request
		String idioma = request.getParameter("idioma");
		                ^
1 error

Any idea ?

Thanks

Mime
View raw message