[ZPT] [Feature Request] Template Libraries

Dieter Maurer dieter@handshake.de
Wed, 26 Sep 2001 19:16:20 +0200 (CEST)


To make ZPTs and METAL-macros really usefull, they
need to be managed somehow.

We need Template Libraries: 

  templates and macros need to be documented
  
    macros
    description
    keywords
    slots
    parameters

  The documentation must be maintained inside a searchable
  catalog to quickly find relevant templates and macros.


Some infrastructure is already there or at least easily implementable:

  *  we can ask a template about its macros

  *  we can (or easily can implement) ask a macro about its slots


What is missing is a standardized documentation feature.


I started to use:

  dmetal:description (a string to describe the purpose of macros and slots)
  dmetal:keywords (a ';' separated sequence of strings to classify macros)
  dmetal:parameters (a ';' separated sequence of (parameter,description) pairs
                     for macros)

Works quite good (although I do not yet know how to access this
information programmatically; will probably require an extension
to PageTemplates).

Bug: It fails, however, when I use them on "tal:XXX" elements
     I need to use to work around other METAL weaknesses.
     It complains about unknown attributes.

     TAL should be as resilient to namespaces it does not
     know as other XML applications!


Dieter