You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Conny Kreyßel <Co...@inter-forum.de> on 2000/07/17 10:48:13 UTC

Get a error when I use xsl:include

Hi, I´m trying to include some files with xsl:include in my Main-XSL-File,
like this:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

  <xsl:include href="http://localhost/xml/xsl/container/main.xsl"/> 
  <xsl:include href="http://localhost/xml/xsl/layout/main.xsl"/> 
  <xsl:include href="http://localhost/xml/xsl/misc/main.xsl"/> 

  <xsl:template match="/">
    <xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
    <html>
      <head>
        <title>TEST</title>
      </head>
      <body>
        <xsl:apply-templates select="*"/>
      </body>
    </html>
  </xsl:template>

</xsl:stylesheet>

its displayed an error:

org.apache.xalan.xslt.XSLProcessorException: The namespace prefix "xsl" was
not declared.
	at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java,
Compiled Code)
	at
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java,
Compiled Code)
	at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java,
Compiled Code)
	at
org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransformer.ja
va, Compiled Code)
	at
org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.java,
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.jserv.JServConnection.processRequest(JServConnection.java,
Compiled Code)
	at org.apache.jserv.JServConnection.run(JServConnection.java,
Compiled Code)
	at java.lang.Thread.run(Thread.java, Compiled Code)

What is wrong?

Best regards

Conny Kreyßel

INTER-FORUM Systemhaus GmbH
Chemnitzer Str. 7
04457 Leipzig
Germany

WWW :  http://www.inter-forum.de/
eMail: conny.kreyssel@inter-forum.de

Re: install problems - 1.7.4 with ServletExec 2.1 on MacOS

Posted by David Parry <da...@suranyami.com>.
on 17/7/00 2:08 pm, Jesse Reynolds at lizst@va.com.au wrote:

> I've installed ServletExec 2.1 into WebSTAR 4.2 on MacOS 9 with MRJ 2.2.2.
> I've put the whole cocoon distribution into the webserver root and configured
> ServletExec 2.1 as per the cocoon website. When I go to
> http://mymachine/anything.xml I get the following response from cocoon.


Here's what I've found to be an okay solution:

Download the ServletExecDebugger from www.newatlanta.com... it's dead handy,
and it works fine on MacOS. Basically, it's a http server with a servlet
engine in it, and they give you a main method, so you can set breakpoints in
it too..

If you are using JBindery, make a simple application using the
ServletExecDebugger's main method, making sure to add all the cocoon classes
to the classpath. Running this seems to be about the easiest of the lot
compared to JSDK or any of the other commercial engines.



------------------------------------------------
David Parry, Object Mangler

115 Highbury New Park, London N5 2HG
Radiophonic Voice Index: +44 7887 550 939
Digital paper facsimile: +44 870 168 9357

email: dayv@suranyami.com
web: http://www.suranyami.com
------------------------------------------------
>Kill kill kill for inner peace and mental health!



install problems - 1.7.4 with ServletExec 2.1 on MacOS

Posted by Jesse Reynolds <li...@va.com.au>.
Hello there

I'm pretty new to Java, so this is probably a stupid question on my part.... 

I've installed ServletExec 2.1 into WebSTAR 4.2 on MacOS 9 with MRJ 2.2.2. I've put the whole cocoon distribution into the webserver root and configured ServletExec 2.1 as per the cocoon website. When I go to http://mymachine/anything.xml I get the following response from cocoon.


                                                          Cocoon 1.7.4
	Publishing Engine could not be initialized.


java.lang.RuntimeException: Error creating org.apache.cocoon.parser.XercesParser: make sure the needed classes can be found in the classpath (org/xml/sax/ErrorHandler)
	at org.apache.cocoon.framework.Manager.create(Manager.java:114)
	at org.apache.cocoon.Engine.(Engine.java:133)
	at org.apache.cocoon.Engine.getInstance(Engine.java:202)
	at org.apache.cocoon.Cocoon.init(Cocoon.java:141)
	at newatlanta.servletexec.HostServletContext.CreateServlet(HostServletContext.java:43)
	at newatlanta.servletexec.HostServletContext.loadConfiguredServlet(HostServletContext.java:159)
	at newatlanta.servletexec.HostServletContext.getServlet(HostServletContext.java:226)
	at newatlanta.servletexec.ServletExec.processServletRequest(ServletExec.java:1461)
	at newatlanta.servletexec.ServletExec.processServletAlias(Compiled Code)
	at newatlanta.servletexec.ServletExec.ProcessRequest(Compiled Code)
	at newatlanta.servletexec.ServletExec.run(ServletExec.java:298)


Warning: this page has been dynamically generated. 


Does anyone have any idea why this would be happening? I've checked that I have the classpath set to include the following (ServletExec Data:Classpath.pref):

path to cocoon:bin:cocoon.jar
path to cocoon:lib:fop_0_12_1.jar
path to cocoon:lib:servlet_2_2.jar
path to cocoon:lib:stylebook-1.0-b2.jar
path to cocoon:lib:xalan_1_0_1.jar
path to cocoon:lib:xerces_1_0_3.jar

Is there any way that I can check that xerces_1_0_3.jar does in fact contain the class "org.apache.cocoon.parser.XercesParser" ? 

Also, is there some way I can echo the classpath environment variable out of ServletExec to a webpage?

Thanks in advance

-jesse

-- 

--
      Jesse Reynolds - Virtual Artists Pty Ltd - http://www.va.com.au
            Email: jesse (at) va.com.au        - http://virtual.artists

Re: Get a error when I use xsl:include

Posted by Ulrich Mayring <ul...@denic.de>.
Conny Kreyßel wrote:
> 
> Hi, I´m trying to include some files with xsl:include in my Main-XSL-File,
> like this:
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> org.apache.xalan.xslt.XSLProcessorException: The namespace prefix "xsl" was
> not declared.

Probably the namespace is not declared in the included files.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung