hi all,

we're doing some XSP stuff, where the same XSP logic needs to be applied
across source documents. one way to do it would be cut-and-paste (arg!),
but we've chosen instead to implement our own built-in tags, where, say,
<fas:header-info/> calls in a whole slew of processing.

(much of this processing has to do with session maintenance and the
like, and nowadays we'd probably redo it all with actions. considering
that we had the thing working, and need to have it working again in two
weeks, though, we're disinclined to re-architect!)

this is working with a 2.0 installation of cocoon; we have the critter
as a built-in logicsheet, referenced in cocoon.xconf. the file lives (as
text, no JAR) in $COCOON_HOME/WEB-INF/classes/ems/logicsheet/, and if i
delete the file the pipeline breaks. but the logicsheet does not seem to
be applied; even if i replace all the hairy, scary logic in its
templates with simple text content that the pipeline should subsequently
stuff into the HTML output, that content does not appear.

i've checked namespace declarations, BTW.

---------------------------------- the logicsheet contains things like:
<?xml version="1.0"?>
<!-- $Revision: 1.1 $ -->
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:xsp="http://apache.org/xsp";
  xmlns:fas="http://www.soils.wisc.edu/asig/";
  xmlns:xsp-request="http://apache.org/xsp/request/2.0";
  xmlns:xsp-session="http://apache.org/xsp/session/2.0";
  create-session="true"
  version="1.0">

<xsl:template match="fas:header-info">
 
  <xsp:logic>
    /* several things break if we have more than 9 risk levels, including the
     * "trigger" mechanism in Recommendations.
     */
    int MAX_RISK_LEVELS = 9;
    int MIN_RISK_LEVEL  = 1;
  <!-- remainder of logic, template, blah blah -->
  </xsp:logic>
</xsl:template

---------------------- and the XML document starts out like:

<?xml version="1.0"?>
<xsp:page 
        xmlns:xsp="http://apache.org/xsp";
        xmlns:fas="http://www.soils.wisc.edu/asig/";
        xmlns:xsp-request="http://apache.org/xsp/request/2.0"; 
        xmlns:session="http://apache.org/xsp/session/2.0"; create-session="true">

        <!-- Set up Java session stuff, pass CGI params into Java objects stored in 
the session, count risk levels, record responses -->
        <Worksheet id="FASProtoC2a" action="NMgt.xml">
                <fas:header-info/>
                <fas:groupParam/>
                <fas:scoringMode/>
        <!-- blah blah -->
        </Worksheet>
</xsp:page>

----------------------- the sitemap has the simple pipeline:
   <map:match pattern="ems/*.xml">
    <map:generate type="serverpages" src="ems/docs/{1}.xml"/>
    <map:transform type="xslt" src="ems/stylesheets/worksheet2html.xsl"/> 
    <map:serialize/>
   </map:match>


----------------------- and cocoon.xconf contains:
        [standard "distribution" logicsheets, ending with...]
        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-session"/>
          <parameter name="uri" value="http://apache.org/xsp/session/2.0"/>
          <parameter name="href" 
value="resource://org/apache/cocoon/components/language/markup/xsp/javascript/session.xsl"/>
        </builtin-logicsheet>
        
        <!-- EMS STUFF -->
        <builtin-logicsheet>
            <parameter name="prefix" value="fas"/>
            <parameter name="uri" value="http://www.soils.wisc.edu/asig/"/>
            <parameter name="href" value="resource://ems/logicsheet/ems.xsp.xsl"/>
        </builtin-logicsheet>
        <!-- /EMS STUFF -->
      </target-language>
</xsp-language>


any ideas, anyone? i've fiddled for a day and a half, and i'm nowhere.

TIA,

rw

-- 
systems programmer
ASIG, univ. of WI soil sciences
http://www.soils.wisc.edu/asig/
608-265-9354, fax 265-2595, cell 345-5247

"The trouble is, voodoo doesn't scale." -- Rob Gingell, Sun VP

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to