Introduction

A resource type package is a publet which contains all components necessary to

resources (documents, assets, ...) of a certain type.

This requires a well-defined interface to access resource type. I could imagine a directory structure like

/lenya
    /publets

        /xhtml
            /config
                /publet.xconf                         Publet configuration
                /resourcetype.xconf                   General resource type configuration (samples etc.)
                /usecases.xconf                       Patch file for cocoon.xconf to insert usecase declarations

            /documentation                            Documentation (Forrest document, can be included in main documentation)
                /index.xml

            /resources
                /schema                               Schema (XSD, Relax NG)
                /samples                              Sample resources
                    /default.xml
                    /simple.xml
                    /detailed.xml

            /java                                     Usecase handlers etc.

            /lenya                                    Resources to use the fallback mechanism (e.g., usecases)
                /usecases

            /resourcetype.xmap                        Sitemap to render resources

        /docbook
        /bitmap-image
        /svg-image

The Contents Of A Resource Type Package

resourcetype.xconf

This file describes the resource type.

<resource-type xmlns="...">

  <schema href="resources/schema/xhtml.rng"/>

  <samples>
    <sample href="resources/samples/default.xml">
      The default XHTML sample.
    </sample>
    <sample href="resources/samples/simple.xml">
      A minimal XHTML document.
    </sample>
    <sample href="resources/samples/detailed.xml">
      A document containing examples of the most XHTML structures.
    </sample>
  </samples>

</resource-type>

resourcetype.xmap

This sitemap handles the presentation of resources.

To provide a unified access point to resources, a common intermediate format has to be defined, for instance XHTML. This means that resourcetype.xmap returns the result of the transformation of the resource into this intermediate format.

It should be possible to support custom views, which are requested using certain URI patterns, request parameters, etc.

Using Resource Types in Publications

The resource types used by a publication are declared in publication.xconf:

<publication>

   <publet id="xhtml"/>
   <publet id="bitmap-image"/>

   ...
</publication>

Options For Creating Resources

Options For Managing Resources

When a usecase is invoked on a resource, the resource type is determined and the usecase handler of this resource type is used. This means the usecase handler resolving strategy is

usecase -> publication -> (publication templates) -> core

Problems

ProposalResourceTypePackages (last edited 2009-09-20 23:27:44 by localhost)