cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve McNally <Mcnal...@synamic.co.uk>
Subject FW: Help on Taglibs and Namespace
Date Thu, 16 Nov 2000 17:12:36 GMT
> Hi all
> 
> I need some help please. I am using XSP for the first time and am trying
> to get my head around the taglibs and namespaces. I thought I had it
> worked out until I tried and got the following error
> 
> org.apache.xalan.xslt.XSLProcessorException: pattern = '' Empty
> expression! at
> org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1674) at
> org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java
> :738) at
> org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:572) at
> org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.
> java:101) at
> org.apache.cocoon.processor.xsp.XSPLogicsheet.apply(XSPLogicsheet.java:102
> ) at
> org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:389
> ) at org.apache.cocoon.Engine.handle(Engine.java:359) at
> org.apache.cocoon.Cocoon.service(Cocoon.java:167) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:50
> 3) at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Htt
> pConnectionHandler.java:160) at
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:3
> 38) at java.lang.Thread.run(Thread.java:484) 
> 
> I am using Cocoon 1.8
> 
> These are the files that I am using
> news-xsp.xsl
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> xmlns:research="/News-xsp">
> 
> <xsl:template match="">
> 
> <xsl:processing-instruction
> name="cocoon-process">type="xsp"</xsl:processing-instruction>
> <xsl:processing-instruction
> name="cocoon-process">type="xslt"</xsl:processing-instruction>
> <xsl:processing-instruction name="xml-stylesheet">href="XSPTest"
> type="text/xsl"</xsl:processing-instruction>
> <xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> 	<xsl:copy>
> 		<xsl:apply-templates match="@*|*|text()"/>
> 	</xsl:copy>
> 	<xsp:structure>
> 		<xsp:include>com.silacom.mobiquote.research</xsp:include>
> 		<xsp:include>com.silacom.mobiquote.framework</xsp:include>
> 	</xsp:structure>
> 	<xsp:logic>
> 		/* This is where the Java  Logic is performed */
> 		private static String getResearchData(int userid) {
> 			return "This is the news text";
> 		}
> 	</xsp:logic>
> 	<xsl:apply-templates/>
> </xsp:page>
> </xsl:template>
> 
> <xsl:template match="researchgenerate_news">
> 	<xsp:expr>
> 		getResearchData(1)
> 	</xsp:expr>
> </xsl:template>
> 
> <xsl:template match="@*|*|text()">
>    <xsl:copy>
>      <xsl:apply-templates select="@*|*|text()"/>
>    </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
> 
> and
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <?cocoon-process type="xsp"?>
> <?cocoon-process type="xslt"?>
> <?xml-logicsheet href="/news-xsp.xsl"?>
> 
> <xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> xmlns:research="/News-xsp">
> 	<news>
> 		<research:generate_news></research:generate_news>
> 	</news>
> </xsp:page>
> 
> My question is could someone give me a pointer on if this is wrong where
> and how ? I have added the location of news-xsp to the cocoon.properties
> file. Also is my namespace declaration correct ? 
> 
> Cheers
> Steve
> 
> Steve McNally
> m-commerce Consultant
> Sila Communications
> 
> E-mail : Steve.McNally@Synamic.co.uk
> Tel : 0207 796 7054
> 

Mime
View raw message