cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick <>
Subject help, please: my 2.0 logicsheets stopped working with 2.0.2
Date Tue, 24 Sep 2002 16:25:30 GMT
hello all,

cocoon allows us to divide labor, as designed. content people get the
source XML file, style people work with the XSL file, and we programmers
hack on XSP.

in order to ensure that the content people didn't have to wade through
(and replicate!) XSP code in each of their pages, we'd adapted an
example from the 2.0 documentation, allowing them to insert a single tag
instead of all the code. with the examples in 2.0.3, it looks like the
"logicsheet" idea has been turned around, or else i understood it
backwards in the first place! the logicsheet example in 2.0 showed an
XSL applied which "inserted" logic, which is exactly what we want.

in any case, the following used to work, and no longer does. i included
all the processing-instruction and namespace headers just in case that's
the problem; most of the logicsheet and other content has been elided,
of course!

==== the content providers work on documents looking like this =====

<?xml version="1.0"?>
<!-- $Revision: 1.7 $ -->

 <ems:Worksheet id="WiBarnMgt01" action="BarnMgt.xml">

  <!-- boilerplate XSP stuff -->

  <!-- Now go on with real live content -->
  <ems:Title supertitle="" subtitle="Environmental Management Systems"> 
   Barnyard and Feedlot Management 

  [etc., etc.]

============ cocoon.xconf contained: ================

  <parameter name="prefix" value="emsXSP"/>
  <parameter name="uri" value=""/>
  <parameter name="href" value="resource://ems/logicsheet/ems.xsp.xsl"/>

============ ems.xsp.xsl contains templates, e.g.: ===================

<?xml version="1.0"?>
<!-- $Revision: 1.1 $ -->

<xsl:template match="emsXSP:header-info">
    /* several things break if we have more than 9 risk levels,
    int MAX_RISK_LEVELS = 9;
    int MIN_RISK_LEVEL  = 1;
    /** StringBuffer in which to build query */
    StringBuffer query = new StringBuffer("");
    /** Vector of queries */
    java.util.Vector queries = new java.util.Vector();
    [yada, yada, yada]
[other templates go here]

=============== finally, the sitemap entry ========================

<map:match pattern="ems/*.xml">
 <map:generate type="serverpages" src="ems/docs/{1}.xml"/>
 <map:transform type="xslt" src="ems/stylesheets/worksheet2html.xsl"/> 

i see no errors cropping up anywhere; it's as if the stylesheet
ems.xsp.xsl is no longer applied to the document, so that none of the
XSP logic fires. i have to admit i never really understood how cocoon
"knew" to apply that logicsheet (unless it has to do with the "prefix"
thing in cocoon.xconf).

??? help ???

systems programmer
ASIG, univ. of WI soil sciences
608-265-9354, fax 265-2595, cell 345-5247

"Otherwise, it's going to get plenty stupider." -- Jan Koloen

View raw message