<%import file="../../globals.dim#*" %> DIML Test Page (short)

DIML Test Page

PHP Implementation

System variable calls

<%%ESSI::OUTPUT_TYPE%%> : "<%%ESSI::OUTPUT_TYPE%%>"
<%%ESSI::TEMPLATE_PATH%%> : "<%%ESSI::TEMPLATE_PATH%%>"
<%%ESSI::INVOKE_PATH%%> : "<%%ESSI::INVOKE_PATH%%>"
<%%ESSI::VERSION%%> : "<%%ESSI::VERSION%%>"
<%%ESSI::AUTHOR%%> : "<%%ESSI::AUTHOR%%>"

CGI variable calls

<%%FORM::session%%> : "<%%FORM::session%%>"

Simple template declaration

<TEMPLATE ID="aTemplate">
a template declaration
</TEMPLATE>


<%%aTemplate%%> : "<%%aTemplate%%>"
Syntax tolerance <% %aTemplate% %> : "<% %aTemplate% %>"

Template exotic namings

<TEMPLATE ID="FUNCTION()">
a special "function-like" naming
</TEMPLATE>

 
<%%FUNCTION()%%> : "<%%FUNCTION()%%>"

<TEMPLATE ID="MULTIPLE::SCOPED::VARIABLE">
a "scoped" naming
</TEMPLATE>

 
<%%MULTIPLE::SCOPED::VARIABLE%%> : "<%%MULTIPLE::SCOPED::VARIABLE%%>"

<TEMPLATE ID="BUZZY-š¨^%ú$">
somewhat strange, is'nt it ?
</TEMPLATE>

 
<%%BUZZY-š¨^%ú$%%> : "<%%BUZZY-š¨^%ú$%%>"

Simple variable call modifiers

<TEMPLATE ID="aTemplateTooLong" INLINE>
a template declaration wich is too long to fit into available space
</TEMPLATE>

 
<TEMPLATE ID="aTemplateTooShort" INLINE>
zip!
</TEMPLATE>

 
<%%aTemplateNull DEFAULT="No Value"%%> : "<%%aTemplateEmpty DEFAULT="No Value"%%>"
<%%aTemplateTooLong MAXLENGTH="20"%%> : "<%%aTemplateTooLong MAXLENGTH="20"%%>"
<%%aTemplateTooShort MINLENGTH="20"%%> : "<%%aTemplateTooShort MINLENGTH="20"%%>"

Inline template declaration

<TEMPLATE ID="aTemplateInline" INLINE>
a template declaration
</TEMPLATE>

<%%aTemplateInline%%> : "<%%aTemplateInline%%>"

Static template declaration

<TEMPLATE ID="aTemplateStatic" STATIC>
a template declaration holding <%%VARIABLE%%>
</TEMPLATE>


<TEMPLATE ID="aTemplateNonStatic" STATIC>
a template declaration holding <%%VARIABLE%%>
</TEMPLATE>

 
<%set %VARIABLE% = "variables" %> <%set %VARIABLE% = "variables" %>
<%%aTemplateStatic%%> : "<%%aTemplateStatic%%>"
<%set %VARIABLE% = "other variables" %> <%set %VARIABLE% = "other variables" %>
<%%aTemplateStatic%%> : "<%%aTemplateStatic%%>"
 
</TEMPLATE><%set %VARIABLE% = "variables" %> <%set %VARIABLE% = "variables" %>
<%%aTemplateNonStatic%%> : "<%%aTemplateNonStatic%%>"
<%set %VARIABLE% = "other variables" %> <%set %VARIABLE% = "other variables" %>
<%%aTemplateNonStatic%%> : "<%%aTemplateNonStatic%%>"

Variable set and eval initializers

Set/Eval data names

<%set %simpleVar% = "adata" %><%set %simpleVar% = "adata" %>
<%%simpleVar%%> = "<%%simpleVar%%>"
 
<%set %_underscored% = "underscore" %><%set %_underscored% = "underscore" %>
<%%_undescored%%> = "<%%_underscored%%>"
 
<%set %@exotic!?-{}% = "is this really usefull ?" %><%set %@exotic!?-{}% = "is this really usefull ?" %>
<%%@exotic!?-{}%%> = "<%%@exotic!?-{}%%>"
 
<%set %functionLike()% = "afunction" %><%set %functionLike()% = "afunction" %>
<%%functionLike()%%> = "<%%functionLike()%%>"
 
<%set %SCOPE::scoped% = "a scoped var" %><%set %SCOPE::scoped% = "a scoped var" %>
<%%SCOPE::scoped%%> = "<%%SCOPE::scoped%%>"
 
<%eval %simpleVar% = "evaluated adata" %><%set %simpleVar% = "evaluated adata" %>
<%%simpleVar%%> = "<%%simpleVar%%>"
 
<%eval %_underscored% = "evaluated underscore" %><%set %_underscored% = "evaluated underscore" %>
<%%_undescored%%> = "<%%_underscored%%>"
 
<%eval %@exotic!?-{}% = "evaluated is this really usefull ?" %><%set %@exotic!?-{}% = "evaluated is this really usefull ?" %>
<%%@exotic!?-{}%%> = "<%%@exotic!?-{}%%>"
 
<%eval %functionLike()% = "evaluated afunction" %><%set %functionLike()% = "evaluated afunction" %>
<%%functionLike()%%> = "<%%functionLike()%%>"
 
<%eval %SCOPE::scoped% = "an evaluated scoped var" %><%set %SCOPE::scoped% = "an evaluated scoped var" %>
<%%SCOPE::scoped%%> = "<%%SCOPE::scoped%%>"

Setting/Evaluating to empty string

<%set %simpleVar% = "" %><%set %simpleVar% = "" %>
<%%simpleVar%%> = "<%%simpleVar%%>"

<%eval %_underscored% = "" %><%eval %_underscored% = "" %>
<%%_underscored%%> = "<%%_underscored%%>"

Set/Eval effect

<%set %embedded% = "embedded and escaped" %><%set %embedded% = "embedded and escaped" %>
<%set %NewSetVariable% = "a new variable that contains &lt;%%embedded%%&gt; calls" %><%set %NewSetVariable% = "a new variable that contains <%%embedded%%> calls" %>
<%eval %NewEvaluatedVariable% = "a new variable that contains &lt;%%embedded%%&gt; calls" %><%eval %NewEvaluatedVariable% = "a new variable that contains <%%embedded%%> calls" %>
 
<%%embedded%%> : "<%%embedded%%>"
<%%NewSetVariable%%> : "<%%NewSetVariable%%>"
<%%NewEvaluatedVariable%%> : "<%%NewEvaluatedVariable%%>"
<%set %embedded% = "changed content" %><%set %embedded% = "changed content" %>
<%%NewSetVariable%%> : "<%%NewSetVariable%%>"
<%%NewEvaluatedVariable%%> : "<%%NewEvaluatedVariable%%>"

Simple vector operations

Simple vector finite iteration

<%set %TABLE1ž0% = "zero" %><%set %TABLE1ž0% = "zero" %>
<%set %TABLE1ž1% = "one" %><%set %TABLE1ž1% = "one" %>
<%set %TABLE1ž2% = "two" %><%set %TABLE1ž2% = "two" %>
<%set %TABLE1ž3% = "three" %><%set %TABLE1ž3% = "three" %>
<%set %TABLE1ž4% = "four" %><%set %TABLE1ž4% = "four" %>
<%set %TABLE1ž5% = "five" %><%set %TABLE1ž5% = "five" %>
 
<TEMPLATE ID="SIMPLE_SCAN" INLINE>
"<%%TABLE1[]%%>" 
</TEMPLATE>

 
<%%SIMPLE_SCAN[4]%%> = "<%%SIMPLE_SCAN[4]%%>"

Offset table access

<%%TABLE1žI%%> : "<%%TABLE1žI%%>" (from last test)
<%%TABLE1[]%%> : "<%%TABLE1[]%%>" 
<%%TABLE1[-1]%%> : "<%%TABLE1[-1]%%>" 
<%%TABLE1[+1]%%> : "<%%TABLE1[+1]%%>" 

Table access via indirection

<%set %INDIRECTION% = "3" %><%set %INDIRECTION% = "3" %>
<%%TABLE1[%INDIRECTION%]%%> : "<%%TABLE1[%INDIRECTION%]%%>" 

Cursor movement operations

<%%TABLE1žI%%> : "<%%TABLE1žI%%>" (from last test)
<%rewind %TABLE1% %><%rewind %TABLE1% %>
<%%TABLE1žI%%> : "<%%TABLE1žI%%>"

<%next %TABLE1% %><%next %TABLE1% %>
<%%TABLE1žI%%> : "<%%TABLE1žI%%>"
<%next %TABLE1% %><%next %TABLE1% %>
<%%TABLE1žI%%> : "<%%TABLE1žI%%>"

<%back %TABLE1% %><%back %TABLE1% %>
<%%TABLE1žI%%> : "<%%TABLE1žI%%>"
<%back %TABLE1% %><%back %TABLE1% %>
<%%TABLE1žI%%> : "<%%TABLE1žI%%>"

Simple vector indefinite iteration

<%rewind %SIMPLE_SCAN% %><%rewind %SIMPLE_SCAN% %>
<%%SIMPLE_SCANžI%%> : "<%%SIMPLE_SCANžI%%>"
<%set %SIMPLE_SCANžC% = "6" %><%set %SIMPLE_SCANžC% = "6" %>
<%%SIMPLE_SCAN[*]%%> = "<%%SIMPLE_SCAN[*]%%>"

Matrix operations

Matrix iteration (table scan)

<%set %TABLEž0ž0% = "A0" %><%set %TABLEž0ž0% = "A0" %>
<%set %TABLEž1ž0% = "A1" %><%set %TABLEž1ž0% = "A1" %>
<%set %TABLEž2ž0% = "A2" %><%set %TABLEž2ž0% = "A2" %>
<%set %TABLEž3ž0% = "A3" %><%set %TABLEž3ž0% = "A3" %>
<%set %TABLEž4ž0% = "A4" %><%set %TABLEž4ž0% = "A4" %>
<%set %TABLEž0ž1% = "B0" %><%set %TABLEž0ž1% = "B0" %>
<%set %TABLEž1ž1% = "B1" %><%set %TABLEž1ž1% = "B1" %>
<%set %TABLEž2ž1% = "B2" %><%set %TABLEž2ž1% = "B2" %>
<%set %TABLEž3ž1% = "B3" %><%set %TABLEž3ž1% = "B3" %>
<%set %TABLEž4ž1% = "B4" %><%set %TABLEž4ž1% = "B4" %>
<%set %TABLEž0ž2% = "C0" %><%set %TABLEž0ž2% = "C0" %>
<%set %TABLEž1ž2% = "C1" %><%set %TABLEž1ž2% = "C1" %>
<%set %TABLEž2ž2% = "C2" %><%set %TABLEž2ž2% = "C2" %>
<%set %TABLEž3ž2% = "C3" %><%set %TABLEž3ž2% = "C3" %>
<%set %TABLEž4ž2% = "C4" %><%set %TABLEž4ž2% = "C4" %>
<%set %TABLEž0ž3% = "D0" %><%set %TABLEž0ž3% = "D0" %>
<%set %TABLEž1ž3% = "D1" %><%set %TABLEž1ž3% = "D1" %>
<%set %TABLEž2ž3% = "D2" %><%set %TABLEž2ž3% = "D2" %>
<%set %TABLEž3ž3% = "D3" %><%set %TABLEž3ž3% = "D3" %>
<%set %TABLEž4ž3% = "D4" %><%set %TABLEž4ž3% = "D4" %>
<%set %TABLEž0ž4% = "E0" %><%set %TABLEž0ž4% = "E0" %>
<%set %TABLEž1ž4% = "E1" %><%set %TABLEž1ž4% = "E1" %>
<%set %TABLEž2ž4% = "E2" %><%set %TABLEž2ž4% = "E2" %>
<%set %TABLEž3ž4% = "E3" %><%set %TABLEž3ž4% = "E3" %>
<%set %TABLEž4ž4% = "E4" %><%set %TABLEž4ž4% = "E4" %>

<TEMPLATE ID="ROWS" INLINE>
<%%CELLS[4]%%>
 
</TEMPLATE>

 
<TEMPLATE ID="CELLS" INLINE>
"<%%TABLE[][]%%>" 
</TEMPLATE>

 
<%%ROWS[4]%%> = "
<%%ROWS[4]%%>"

Offset table access

<%%TABLEžI%%> : "<%%TABLEžI%%>" (from last test)
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>" (from last test)
<%%TABLE[][]%%> : "<%%TABLE[][]%%>" 
<%%TABLE[-1][-1]%%> : "<%%TABLE[-1][-1]%%>" 
<%%TABLE[+1][+1]%%> : "<%%TABLE[+1][+1]%%>" 

Cursor movement operations (unbounded table)

<%%TABLEžI%%> : "<%%TABLEžI%%>" (from last test)
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>" (from last test)
<%rewind %TABLE% %><%rewind %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"

<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"

<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"

Cursor movement operations (bounded table)

<%set %TABLEžC% = "4" %><%set %TABLEžC% = "4" %>
<%set %TABLEžCžC% = "4" %><%set %TABLEžCžC% = "4" %>
 
<%%TABLEžI%%> : "<%%TABLEžI%%>" (from last test)
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>" (from last test)
<%rewind %TABLE% %><%rewind %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"

<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
Should wrap around dimensions
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%next %TABLE% %><%next %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"

<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"
<%back %TABLE% %><%back %TABLE% %>
<%%TABLEžI%%> : "<%%TABLEžI%%>"
<%%TABLEžIžI%%> : "<%%TABLEžIžI%%>"

LOL operations (list of lists)

Conditional statements

One shot instructions

<%if (%avar0% eq "true") "single" %endif %> : "<%if (%avar0% eq "true") "single" %endif %>"
<%set %avar0% = "true" %><%set %avar0% = "true" %>
<%if (%avar0% eq "true") "single" %endif %> : "<%if (%avar0% eq "true") "single" %endif %>"
 
<%set %encapsed% = "single with injection" %><%set %encapsed% = "single with injection" %>
<%if (%avar0% eq "true") "&lt;%%encapsed%%&gt;" %endif %> : "<%if (%avar0% eq "true") "<%%encapsed%%>" %endif %>"
 
<%if (%avar1% eq "true") "first" %else "second" %endif %> : "<%if (%avar1% eq "true") "first" %else "second" %endif %>"
<%set %avar1% = "true" %><%set %avar1% = "true" %>
<%if (%avar1% eq "true") "first" %else "second" %endif %> : "<%if (%avar1% eq "true") "first" %else "second" %endif %>"
 
<%set %var_if% = "this is if" %><%set %var_if% = "this is if" %>
<%set %var_else% = "this is else" %><%set %var_else% = "this is else" %>
<%if (%avar2% eq "true") %var_if% %else %var_else% %endif %> : "<%if (%avar2% eq "true") %var_if% %else %var_else% %endif %>"
<%set %avar2% = "true" %><%set %avar2% = "true" %>
<%if (%avar2% eq "true") %var_if% %else %var_else% %endif %> : "<%if (%avar2% eq "true") %var_if% %else %var_else% %endif %>"

Multiline instructions

<%if (%avar3% eq "true") %>
first multiline
<%else %>
second multiline
<%endif %>> : "<%if (%avar3% eq "true") %>first multiline<%else %>second multiline<%endif %>"
<%set %avar3% = "true" %><%set %avar3% = "true" %>
Same expression as above : "<%if (%avar3% eq "true") %>first multiline<%else %>second multiline<%endif %>"

Nested Multiline instructions

<%if (%avar4% eq "true") %>
first multiline
<%else %>
   <%if (%avar5% eq "true") %>
   first second multiline
   <%else %>
   second second multiline
   <%endif %>
<%endif %> : "<%if (%avar4% eq "true") %>first multiline<%else %><%if (%avar5% eq "true") %>first second multiline<%else %>second second multiline<%endif %><%endif %>"
<%set %avar4% = "true" %><%set %avar4% = "true" %>
Same expression as above : "<%if (%avar4% eq "true") %>first multiline<%else %><%if (%avar5% eq "true") %>first second multiline<%else %>second second multiline<%endif %><%endif %>"
<%set %avar4% = "" %><%set %avar4% = "" %>
<%set %avar5% = "true" %><%set %avar5% = "true" %>
Same expression as above : "<%if (%avar4% eq "true") %>first multiline<%else %><%if (%avar5% eq "true") %>first second multiline<%else %>second second multiline<%endif %><%endif %>"

Condition expressions

<%set %avar4% = "une variable" %><%set %avar4% = "une variable" %> 
<%if (%avar4% eq "une variable") "passed" %endif %> : "<%if (%avar4% eq "une variable") "passed" %endif %>"
<%if (%avar4% =~ /var.*a/) "passed" %endif %> : "<%if (%avar4% =~ /var.*a/) "passed" %endif %>"
<%if (%avar4% !~ /kboutz/) "passed" %endif %> : "<%if (%avar4% !~ /kboutz/) "passed" %endif %>"
<%if (%avar4% =~ /kboutz/) "passed" %endif %> : "<%if (%avar4% =~ /kboutz/) "passed" %endif %>"
<%if (%avar4% =~ /^une/) "passed" %endif %> : "<%if (%avar4% =~ /^une/) "passed" %endif %>"
<%if (%avar4% == "une variable") "passed" %endif %> : "<%if (%avar4% == "une variable") "passed" %endif %>"

Overscripting invokations

<%%newvar%%> : "<%%newvar%%>"
<%invoke script="overscript.php" %><%invoke script="overscript.php" %>
<%%newvar%%> : "<%%newvar%%>"

Time Calculation benching

Os was : <%%ENV::OS%%>