cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [C2] Custom Logicsheets
Date Thu, 05 Jul 2001 13:04:00 GMT
"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>
Mime
View raw message