cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Raiczyk <alejand...@technisys.com.ar>
Subject RE: [Cocoon Users] XSL chaining.
Date Wed, 30 Aug 2000 15:12:01 GMT
I've done every step you told me, but it's not working yet.
This is the header of my XML file:

<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<?xml-stylesheet href="estilo.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<?cocoon-process type="stylesheet-chain"?>
<?xml-stylesheet href="filtroIdioma.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>


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

and this is the exception that cocoon is throwing:

java.lang.NullPointerException
	at org.apache.cocoon.Utils.getFirstPI(Utils.java, Compiled Code)
	at
org.apache.cocoon.processor.ProcessorFactory.getType(ProcessorFactory.java,
Compiled Code)
	at
org.apache.cocoon.processor.ProcessorFactory.getProcessor(ProcessorFactory.j
ava, Compiled Code)
	at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
	at org.apache.cocoon.Cocoon.service(Cocoon.java, Compiled Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
	at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)
	at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java, Compiled Code)
	at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)
	at java.lang.Thread.run(Thread.java, Compiled Code)

Here is the first XSL:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>


 <xsl:param name="idioma" select="ingles"/>
<!-- Filtra todo lo que sea ingles -->

<xsl:template match="processing-instruction()"> 
 <xsl:copy-of select="."/> 
</xsl:template> 

<xsl:template match="@*|node()" priority="-1"> 
 <xsl:copy>
  <xsl:apply-templates select="@*|node()"/>
 </xsl:copy> 
</xsl:template> 

   <xsl:template match="ingles">
       <xsl:if test="$idioma='ingles'">
       	<xsl:apply-templates/>
       </xsl:if>
    </xsl:template>


<xsl:template match="espanol">
       <xsl:if test="$idioma='espanol'">
       	<xsl:apply-templates/>
       </xsl:if>
    </xsl:template>

</xsl:stylesheet>

Do you know what am I doing wrong ?

Thanks for your help!

-----Mensaje original-----
De: Tagunov Anthony [mailto:atagunov@nnt.ru]
Enviado el: Miercoles 30 de Agosto de 2000 3:30 AM
Para: Alejandro Raiczyk; cocoon-users@xml.apache.org
Asunto: Re: [Cocoon Users] XSL chaining.


Alejandro Raiczyk wrote:
>Hi people, I was wondering how can I chain XSL Stylesheets ? 
>..

I guess everyone who tried to chain stylesheets in Cocoon 1.7.4 hit this
problem. I did. Robin Green <greenrd@hotmail.com> said that's a bug in
Cocoon and sent me his
work around that works fine for me, here it is:


Mime
View raw message