Hi,
 
My logicsheet provides XSP support templates, for controlling the structure of the generated XML. A typical template generates an XML fragment, including the local 'root' (top-level) element, attributes, content and child elements.
 
The strange behavior is that my 'root' element is not being processed (in the example below, <my:object/> is never created), but all subsequent attributes, content and child elements are processed as expected.
 
I've looked at the XSP generated java file, which does not issue any SAX events relating to the creation of the first element, but everything else is there as expected.
 
This logicsheet worked 'perfectly' in Cocoon 1.8.2, and I have made the appropriate namespace changes to C2 enable it.
 
Does anyone know what's happening here?
Thanks,
Adrian 
 
 
=================== LOGICSHEET fragment ============================
<xsl:template match="util:get-object">
  <xsp:element name="my:object">
    <xsp:logic>
      { /* BEGIN: scope */
        // mixture of Java code and <xsp:.../> tags
      } /* END:  scope */
    </xsp:logic>
  </xsp:element>
</xsl:template>
=================== XSP fragment ============================
<xsp:page
  xmlns:xsp="http://apache.org/xsp"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
  xmlns:session="http://apache.org/xsp/session/2.0"
  xmlns:util="my.com/xsp/util"
  language="java"
  create-session="true"
  xmlns:my="my.com/my"
>
<my:data>
  <xsp:logic>
    try {
     <util:get-object>
        <!-- parameters omitted for clarity -->
     </util:get-object>
 
    }
    catch(Exception ex) {
      System.out.println(ex.getMessage());
    }
  </xsp:logic>
</my:data>
</xsp:page>

Reply via email to