You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Morrison, John" <Jo...@uk.experian.com> on 2001/07/04 16:24:19 UTC

[C2] Custom Logicsheets

Hi All,

I *know* I really should have written some of these before now but... All
the documentation refers to C1 use of logicsheets.  How do I tell C2 one
exists and where is the best place to put the xslt (ie somewhere under
WEB-INF)?

Thanks,

J.


=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

Re: [C2] Custom Logicsheets

Posted by Berin Loritsch <bl...@apache.org>.
"Morrison, John" wrote:
> 
> Hi All,
> 
> I *know* I really should have written some of these before now but... All
> the documentation refers to C1 use of logicsheets.  How do I tell C2 one
> exists and where is the best place to put the xslt (ie somewhere under
> WEB-INF)?

I usually place my custom logicsheets in the following location:

${context}/WEB-INF/logicsheets/


You tell Cocoon 2 that they exist using the following snippet in Cocoon.xconf:


        <builtin-logicsheet>
          <parameter name="prefix" value="my-sheet"/>
          <parameter name="uri" value="http://my.org/xsp/sheet/1.0"/>
          <parameter name="href" value="context://WEB-INF/logicsheets/my-sheet.xsl"/>
        </builtin-logicsheet>


You place it in the Cocoon.xconf file under "markup-languages" like the following snippet:


  <markup-languages>
    <component-instance name="xsp" class="org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage">
      <parameter name="prefix" value="xsp"/>
      <parameter name="uri" value="http://apache.org/xsp"/>

      <target-language name="java">
        <parameter name="core-logicsheet" value="resource://org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl"/>

        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-request"/>
          <parameter name="uri" value="http://apache.org/xsp/request/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/request.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-response"/>
          <parameter name="uri" value="http://apache.org/xsp/response/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/response.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="session"/>
          <parameter name="uri" value="http://apache.org/xsp/session/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/session.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-cookie"/>
          <parameter name="uri" value="http://apache.org/xsp/cookie/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/cookie.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="esql"/>
          <parameter name="uri" value="http://apache.org/cocoon/SQL/v2"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/esql.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="log"/>
          <parameter name="uri" value="http://apache.org/xsp/log/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/log.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="util"/>
          <parameter name="uri" value="http://apache.org/xsp/util/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/util.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="xsp-formval"/>
          <parameter name="uri" value="http://apache.org/xsp/form-validator/2.0"/>
          <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/form-validator.xsl"/>
        </builtin-logicsheet>

        <builtin-logicsheet>
          <parameter name="prefix" value="soap"/>
          <parameter name="uri" value="http://apache.org/xsp/soap/2.0"/>
          <parameter name="href" value="context://docs/samples/soap/soap-lib.xsl"/>
        </builtin-logicsheet>

      </target-language>
    </component-instance>

    <component-instance name="sitemap" class="org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage">
      <parameter name="prefix" value="map"/>
      <parameter name="uri" value="http://apache.org/cocoon/sitemap/1.0"/>

      <target-language name="java">
        <parameter name="core-logicsheet" value="resource://org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl"/>
      </target-language>
    </component-instance>
  </markup-languages>