You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Eduardo Yánez <ey...@eversystems.com> on 2001/06/27 18:01:47 UTC

C2: XSLT malfunction

Hi all!

Im creating a simple menu, the xml code is:


<?xml version="1.0" encoding="ISO-8859-1"?>

<topFrame id="top">
  	<topMenu>
   	   <menuItem id="m1_services_" capt="services" href="/info/services.xml">
   	      <desc>Description of the Guanoco.com services.</desc>
   	   </menuItem>
   	   <menuItem id="m1_aboutus_" capt="about us" href="/info/about_us.xml">
   	      <desc>Who we are.</desc>
   	   </menuItem>
   	   <menuItem id="m1_profile_" capt="profile" href="/users/profile.xml">
   	      <desc>Registered users can review and update their personal data.</desc>
   	   </menuItem>
                 <menuItem id="m1_sitemap_" capt="site map" href="/info/sitemap.xml">
                    <desc>All the site's pages and their functions.</desc>
   	   </menuItem>
   	   <menuItem id="m1_job_" capt="job opportunities" href="/info/job_oportunities.xml">
   	      <desc>Job opportunities with &amp; at Guanoco.com.</desc>
   	   </menuItem>
   	</topMenu>
</topFrame>


and the xsl is:


<?xml version="1.0"?>

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

<xsl:template match="/">
   <html>
      <head>
         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
         <script src="js/utils.js"/>
      </head>
      <body bgcolor="#FFFFFF">
         <xsl:apply-templates/>
      </body>
   </html>
</xsl:template>

<xsl:template match="topMenu">
  <table width="750" border="0" cellspacing="0" cellpadding="0" bgcolor="#336666" height="15">
      <tr>
        <td valign="top" width="220">
           <img src="images/transp.gif" width="220" height="5"/>
        </td>
        <xsl:apply-templates/>
        <td valign="top" width="50">
           <img src="images/transp.gif" width="50" height="5"/>
        </td>
      </tr>
   </table>
</xsl:template>

<xsl:template match="menuItem">
   <xsl:variable name="widthList">095 080 090 080 135</xsl:variable>
   <xsl:variable name="width"><xsl:value-of select="substring($widthList, 4*(position()-1)+1, 3)"/></xsl:variable>
   <xsl:variable name="height">15</xsl:variable>
   <td valign="top" width="{$width}" height="{$height}">
      <a>
         <xsl:attribute name="onmouseover">javascript:rollover('<xsl:value-of select="@id"/>','on');</xsl:attribute>
         <xsl:attribute name="onmouseout">javascript:rollover('<xsl:value-of select="@id"/>','off');</xsl:attribute>
         <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
         <img width="{$width}" height="{$height}" border="0">
            <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
            <xsl:attribute name="src">images/<xsl:value-of select="@id"/>off.gif</xsl:attribute>
            <xsl:attribute name="alt"><xsl:value-of select="@capt"/></xsl:attribute>
         </img>
      </a>
      <xsl:value-of select="position()"/>
   </td>
</xsl:template>

</xsl:stylesheet>


The values returned by the XPath "position()" function are 2, 4, 6, 8, 10!!!!!! so the "substring" function fails to compute 
the bitmap width for each link and the menu presentation is damaged :-(

What is the problem here? is this the mail list for this question?

Regards, 
Eduardo Yanez.

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: C2: initialization error

Posted by java guru <ja...@yahoo.co.in>.
Hi Martin.,
   As you might already know., the way c2 works is  it
tries to compile the sitemap at the start-up..for some
reasons, the sitemap cannot get compiled and we would
encounter such errors. The description of error on
screen is so generalized 'coz for cocoon, the problem
is sitemap didnt get proper compilation. The cause
could be anything..which is probably described
somewhere in cocoon.log..

Best way to debug is 

1. Shutdown the cocoon and servlet engine.
2. Delete the cocoon.log
3. Restart cocoon
4. Try to access the url..it fails
5. Goto cocoon.log
6. Lots of messages there, but look for ones with some
error descriptions..you may get a clue
7. Still cannot figure out? attache the log(zip it if
needed) and send mail with very specifics of
everything to this mailing list.
8. Many people ask for specifics 'coz this error is so
generalized, its impossible to tell just from the
message..

Good luck


 --- Martin Mauri <mm...@profesi.com.ar> wrote: > Hi
Giacomo.
> 
> As the subject said, I'm using C2 over Tomcat 3.2.1
> and Windoes ME.
> This error happens when I point to
> http://localhost:8080/cocoon/ and though
> the servlet engine is working good, I get the error
> mentioned before. Any
> idea?
> 
> regards.
> 
> Martin
> 
> > There is a cocoon.log file somewhere created which
> would hold more
> > information. Please don't be sparse with
> information about your
> > problems. Tell us at least the cocoon version you
> are using, which
> > servlet engine, operation system and alike.
> >
> 
> >
> > > Hi Cocooners,
> > >
> > > Trying to startup cocoon 2 I get the following
> exception. I can't cop
> > > anymore with this error, any suggestion?
> > > It says it has to do something with the
> sitemap...
> > >
> >
> >
>
--------------------------------------------------------------------------
> --
> > > ------------------------------------------------
> > >
> > > type internal-server-error
> > >
> > > message The sitemap handler's sitemap is not
> available.
> > >
> > > description
> org.apache.cocoon.ProcessingException: The sitemap
> handler's
> > > sitemap is not available.
> > >
> > > sender org.apache.cocoon.servlet.CocoonServlet
> > >
> > > source Cocoon servlet
> > >
> > > request-uri
> > >
> > > /cocoon/
> > >
> > > exception
> > >
> > > org.apache.cocoon.ProcessingException: The
> sitemap handler's sitemap is
> not
> > > available.
> > >
> > > path-info
> > >
> > > stacktrace
> > >
> > > org.apache.cocoon.ProcessingException: The
> sitemap handler's sitemap is
> not
> > > available.
> > >  at
>
org.apache.cocoon.sitemap.Manager.setupProcessing(Manager.java:185)
> > >  at
>
org.apache.cocoon.sitemap.Manager.invoke(Manager.java:96)
> > >  at
> org.apache.cocoon.Cocoon.process(Cocoon.java:288)
> > >  at
>
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:442)
> > >  at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >  at
>
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> > >  at
>
org.apache.tomcat.core.Handler.service(Handler.java:286)
> > >  at
>
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > >  at
> > >
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> > > 7)
> > >  at
>
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> > >  at
> > >
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> > > onnectionHandler.java:210)
> > >  at
> > >
>
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > >  at
> > >
>
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> > >  at java.lang.Thread.run(Thread.java:484)
> > >
> >
> >
>
--------------------------------------------------------------------------
> --
> > > ------------------------------------------------
> > > thanks in advance.
> > >
> > > Martin
> > >
> > >
> > >
>
---------------------------------------------------------------------
> > > Please check that your question has not already
> been answered in the
> > > FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail:
> <co...@xml.apache.org>
> > > For additional commands, e-mail:
> <co...@xml.apache.org>
> > >
> > >
> > >
> > >
> >
> >
> >
>
---------------------------------------------------------------------
> > Please check that your question has not already
> been answered in the
> > FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail:
> <co...@xml.apache.org>
> > For additional commands, e-mail:
> <co...@xml.apache.org>
> 
> 
>
---------------------------------------------------------------------
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail:
> <co...@xml.apache.org>
> For additional commands, e-mail:
> <co...@xml.apache.org>
>  

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: C2: initialization error

Posted by Martin Mauri <mm...@profesi.com.ar>.
Hi Giacomo.

As the subject said, I'm using C2 over Tomcat 3.2.1 and Windoes ME.
This error happens when I point to http://localhost:8080/cocoon/ and though
the servlet engine is working good, I get the error mentioned before. Any
idea?

regards.

Martin

> There is a cocoon.log file somewhere created which would hold more
> information. Please don't be sparse with information about your
> problems. Tell us at least the cocoon version you are using, which
> servlet engine, operation system and alike.
>

>
> > Hi Cocooners,
> >
> > Trying to startup cocoon 2 I get the following exception. I can't cop
> > anymore with this error, any suggestion?
> > It says it has to do something with the sitemap...
> >
>
> --------------------------------------------------------------------------
--
> > ------------------------------------------------
> >
> > type internal-server-error
> >
> > message The sitemap handler's sitemap is not available.
> >
> > description org.apache.cocoon.ProcessingException: The sitemap handler's
> > sitemap is not available.
> >
> > sender org.apache.cocoon.servlet.CocoonServlet
> >
> > source Cocoon servlet
> >
> > request-uri
> >
> > /cocoon/
> >
> > exception
> >
> > org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is
not
> > available.
> >
> > path-info
> >
> > stacktrace
> >
> > org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is
not
> > available.
> >  at org.apache.cocoon.sitemap.Manager.setupProcessing(Manager.java:185)
> >  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:96)
> >  at org.apache.cocoon.Cocoon.process(Cocoon.java:288)
> >  at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:442)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >  at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> >  at org.apache.tomcat.core.Handler.service(Handler.java:286)
> >  at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> >  at
> >
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> > 7)
> >  at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> >  at
> >
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> > onnectionHandler.java:210)
> >  at
> >
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> >  at
> >
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> >  at java.lang.Thread.run(Thread.java:484)
> >
>
> --------------------------------------------------------------------------
--
> > ------------------------------------------------
> > thanks in advance.
> >
> > Martin
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: C2: initialization error

Posted by giacomo <gi...@apache.org>.
On Wed, 27 Jun 2001, Martin Mauri wrote:

There is a cocoon.log file somewhere created which would hold more
information. Please don't be sparse with information about your
problems. Tell us at least the cocoon version you are using, which
servlet engine, operation system and alike.

Giacomo

> Hi Cocooners,
>
> Trying to startup cocoon 2 I get the following exception. I can't cop
> anymore with this error, any suggestion?
> It says it has to do something with the sitemap...
>
> ----------------------------------------------------------------------------
> ------------------------------------------------
>
> type internal-server-error
>
> message The sitemap handler's sitemap is not available.
>
> description org.apache.cocoon.ProcessingException: The sitemap handler's
> sitemap is not available.
>
> sender org.apache.cocoon.servlet.CocoonServlet
>
> source Cocoon servlet
>
> request-uri
>
> /cocoon/
>
> exception
>
> org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not
> available.
>
> path-info
>
> stacktrace
>
> org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not
> available.
>  at org.apache.cocoon.sitemap.Manager.setupProcessing(Manager.java:185)
>  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:96)
>  at org.apache.cocoon.Cocoon.process(Cocoon.java:288)
>  at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:442)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>  at org.apache.tomcat.core.Handler.service(Handler.java:286)
>  at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>  at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
>  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>  at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:210)
>  at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>  at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>  at java.lang.Thread.run(Thread.java:484)
>
> ----------------------------------------------------------------------------
> ------------------------------------------------
> thanks in advance.
>
> Martin
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


C2: initialization error

Posted by Martin Mauri <mm...@profesi.com.ar>.
Hi Cocooners,

Trying to startup cocoon 2 I get the following exception. I can't cop
anymore with this error, any suggestion?
It says it has to do something with the sitemap...

----------------------------------------------------------------------------
------------------------------------------------

type internal-server-error

message The sitemap handler's sitemap is not available.

description org.apache.cocoon.ProcessingException: The sitemap handler's
sitemap is not available.

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/

exception

org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not
available.

path-info

stacktrace

org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not
available.
 at org.apache.cocoon.sitemap.Manager.setupProcessing(Manager.java:185)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:96)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:288)
 at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:442)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

----------------------------------------------------------------------------
------------------------------------------------
thanks in advance.

Martin


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>