Here we give an overview of the features of the Kauri template language, and their current state. We also give a qualification of the importance/urgency of the feature.
Legend:
|
-- |
not needed |
|
+ |
nice to have |
|
++ |
need to have |
|
+++ |
blocker (i.e. need to have asap) |
|
directive |
state |
qualification |
note |
|---|---|---|---|
| if... |
|
++ |
|
|
if... else... |
-- |
no added value next to choose when... otherwise... |
|
| choose -> when... |
|
++ |
|
|
choose -> otherwise... |
|
++ |
|
| forEach... |
|
++ ++ |
repeat number of times ; access to: index, number, (size), (position), revIndex, revNumber foreach x in collection |
|
import <template> |
|
++ |
@runtime - xslt-alike - local macro's and var assignments overrule the ones in the imported template |
|
include <template> |
|
++ |
@runtime - xslt-alike - included macro's and var assignments can overrule when include is after the local declaration |
|
insert <url> insert <var> |
|
+++ |
@runtime - verbatim copy of refered document note: have to think about
surpressing e.g. html/body |
|
comment |
|
+ |
ability to generate comments in output |
|
attribute |
|
++ |
|
|
element |
|
++ + |
create an output element with a dynamic name support creation of namespaced elements |
|
macro |
|
+ |
|
|
variable |
|
++ + |
create a local alias of an object support dom-trees (maybe implement when adding xpath support ?) |
|
expression |
state |
qualification |
note |
|---|---|---|---|
|
true, false |
|
++ |
|
|
and, or, ! (not) |
|
++ |
|
|
==, !=, <, >, <=, >= |
|
++ |
|
|
toUpperCase, toLowerCase |
|
++ |
|
|
substring, left, right |
|
+ |
|
|
trim |
|
+ |
|
|
length |
|
++ |
|
|
concat |
|
-- |
this can be done implicit, so maybe we don't need a concat expression |
|
date (with formatting options), now |
|
+ |
|
|
startswith, endswith, contains |
|
++ |
|
|
exp ? val1 : val2 |
|
++ |
|
topic |
state |
qualification |
note |
|---|---|---|---|
|
taglibs support |
|
++ |
first attempt |
|
decorator |
|
+ |
waiting for concrete use case |
|
formatting, i18n |
|
+++ |
very important - via EL |
|
public uri translate |
|
+++ |
very important - via EL |
|
function registry |
|
+++ |
enable through module interface: important |
|
whitespace handling |
|
++ |
keep in mind |
|
template inheritance mechanism |
|
+++ |
cfr include and import ; important |
|
XPath support in EL |
|
++ |
inspiration from xslt - use jxpath (cfr jxtemplate) ? Yes: important (not blocking) |
|
support for groovy expressions |
|
+++ |
think about it asap : might demand serious refactoring so decisions are important |
|
security aspect |
|
-- |
possibility to white- or blacklist locations of scripts (e.g. groovy) and templates |
|
subject |
state |
note |
|---|---|---|
|
template executor |
|
sax based default implementation |
|
template builder |
|
sax based default implementation |
|
template service |
|
first version with some basic caching |
|
junit tests |
|
|
|
documentation |
|
some more javadoc, documentation with some drawings to explain how the engine works |
|
restlet/kauri integration |
|
resolver, context (also request, response), caching (compiledtemplate & output) !!! |