This is a report of a first meeting on Kauri templating.

Needs and expectations

standalone running templating system, i.e.

  • independent of
    • Kauri
    • web
  • plugable
    • context provider (inc. locale & timezone of user)
    • source resolver
    • caching
    • URL support

  • focus on language interpretation and execution

process

  • kauri users should be able to
    • work entirely static
    • build upon wireframes
    • support in wysiwyg editor (e.g. dreamweaver)
      • not fully decided on
      • we don't want our templates to "break" in such editors
      • but active support could be overreaching

language features

  • data binding
    • automatic ecaping prevents cross site scripting
    • we should define a way to allow it in cases where it could be useful (feature of parser ?)
    • xpath on dom tree
    • xml include (via parse)
  • expression language: clean, easy to use
  • I18N localization, data formatting
    • including formatting of dates and numbers (e.g. decimal separator)
  • conditionals & loops
  • configuration and (global) defaults
  • embedable in pipeline
    • XML output
    • perhaps also SAX input
  • "include" syntax
  • recursive
    • something like "call template" macro
  • modularity : split over multiple files
  • importance of whitespace handling
    • clean up where possible
    • keep where necessary
    • cfr. xsl
  • url formatting and escaping
  • template inheritance
  • skinning
  • possible implementation on browser side
  • base for non-xml
    • JSON
    • e-mail body
    • perhaps post procession step to get rid of the tags
  • import xsl-processed dom-tree => xml pipe on context varible (requires intern pseudo protocol)
  • why not use xslt:
         - verbose
         - only xml input

templating use cases

  • email formatting
  • xml data resources representation
  • generic page layout templating HTML
  • skinning and overriding
  • complex interaction layouts
    • e.g. planning table
  • wireframing
    • no logic controller, no data ?
  • i18n ; template translation
  • JSON resource representation
  • DHTML expansion at browser
    • subset of template language

content use cases

  • field property
  • repeater - foreach
    • also for text with delimiter ?
    • availability of status object: position, ...
  • conditionals
    • if
    • case switch
  • date + formatting
  • javascript: formatting & escaping
  • string features
    • trimming
    • uppercase, lowercase
  • css classes based on conditions
    • odd - even
    • first - last
    • mod n
    • level n
  • blurp html/xml
  • url with arguments
  • input of base uri's from context
  • java property
  • expressions
    • concat, left$, right$, trim, date, ...
    • also for conditions, e.g. ifchanged in loop
    • extendable ?
    • filters ? (cfr django)