You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mike LaRocca <la...@spinnakernet.com> on 2000/11/29 15:46:26 UTC

cocoon2 bug in XSPObjectHelper.java

Found a usage bug with XSPObjectHelper.addAttribute()  where attribute
names are not  making it into the SAX stream.  If the qualified
attribute name is not set to the local attribute name then the attribute
name will be absent in the output document.

  protected static void addAttribute(
    AttributesImpl attr,
    String name,
    String value
  )
    throws SAXException
  {
    // before fix
    //attr.addAttribute("", name, "", "CDATA", value);

    // after fix
    attr.addAttribute("", name, name, "CDATA", value);
  }

I found this with a logicsheet helper object that I'm working on but you
can reproduce the problem by running the simple.xsp exmple for cocoon2.
eg. http://localhost:8080/cocoon/xsp/simple?name=bush&name=gore

Output before fix (NOTE the missing attribute name 'name'):
     Parameter Values for "":
        bush
        gore

Output after fix:
     Parameter Values for "name":
        bush
        gore

--Mike LaRocca
larocca@spinnakernet.com