cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jo Bourne <>
Subject [c2] possible util logicsheet bug
Date Tue, 16 Oct 2001 02:37:47 GMT

I am trying to upgrade our c1.8.2 sites to c2 and I think I have found a bug in the util logic
sheet, I am trying to include an remote xml page using xsp. first i tried using pages from
one of our c1.8.2 that worked fine before upgrading (I did change the xsp namespace declarations)
and when this failed I have pruned back and back until all I have is this:

<?xml version="1.0" ?>
<xsp:page language="java" xmlns:xsp=""

the page i am trying to include (login) is a simple xml file and is loading fine if i access
it directly.

the error i am getting is :

Error creating the resource
Language Exception 
org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException:
Error compiling login2_xml: Line 97, column 104: ')' expected.

the .java file generated is below, and attached. From looking at the logicsheet I think that
the get-nested-content is causing the line produced by include-uri to end in "););" which
I believe is illegal?

I would be very grateful if you could confirm if this is a bug or not, I am not on the dev
list so if you could cc me on your emails that would be great,

we are using c2rc1a on tomcat 4b8, on freeBSD

thanks in advance

package org.apache.cocoon.www.file_.usr.local.jakarta_tomcat_4_0.webapps.cocoon.afringe;

import java.util.Date;
import java.util.List;
import java.util.Stack;

//import org.w3c.dom.*;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;

//import org.apache.avalon.framework.*;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.component.ComponentSelector;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.excalibur.datasource.DataSourceComponent;
//import org.apache.avalon.framework.util.*;

import org.apache.cocoon.Constants;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.parser.Parser;
import org.apache.cocoon.generation.Generator;
//import org.apache.cocoon.util.*;

import org.apache.cocoon.components.language.markup.xsp.XSPGenerator;
import org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper;
import org.apache.cocoon.components.language.markup.xsp.XSPRequestHelper;
import org.apache.cocoon.components.language.markup.xsp.XSPResponseHelper;

/* User Imports */


import java.util.Date;


import java.text.SimpleDateFormat;

import org.apache.cocoon.components.language.markup.xsp.XSPUtil;

 * Generated by XSP. Edit at your own risk, :-)
public class login2_xml extends XSPGenerator {

  static {
    dateCreated = 1003160157377L;
    dependencies = new File[]{

  /* Built-in parameters available for use */
  // context    - ServletContext
  // request    - HttpServletRequest
  // response   - HttpServletResponse
  // parameters - parameters defined in the sitemap

  /* User Class Declarations */

  * Generate XML data.
  public void generate() throws SAXException, IOException,
  ProcessingException {

    AttributesImpl xspAttr = new AttributesImpl();

    this.contentHandler.startPrefixMapping("util", "");

    this.contentHandler.startPrefixMapping("xsp", "");

    this.contentHandler.startElement("", "page", "page", xspAttr);


      String __name = String.valueOf(this.characters(""););
        org.apache.cocoon.components.parser.Parser newParser = null;
        org.apache.cocoon.components.url.URLFactory factory = null;

        try {
          newParser = (org.apache.cocoon.components.parser.Parser)
          factory = (org.apache.cocoon.components.url.URLFactory)
          URL __url = factory.getURL(__name);
          InputSource __is = new InputSource(__url.openStream());

          XSPUtil.include(__is, this.contentHandler, newParser);
        } catch (Exception e) {
          getLogger().error("Could not include page", e);
        finally { if (factory != null)
                    this.manager.release((Component) factory);
                  if (newParser != null)
                      this.manager.release((Component) newParser);
                    } }
    this.characters("\t\n    ");

    this.contentHandler.endElement("", "page", "page");




To unsubscribe, e-mail:
For additional commands, email:

View raw message