<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.invenzzia.org/en/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Invenzzia... in English - Open Power Template</title>
  <link>http://blog.invenzzia.org/en/</link>
  <description></description>
  <language>en</language>
  <pubDate>Fri, 25 Jul 2008 17:12:15 +0100</pubDate>
  <copyright>Copyright &amp;copy; Invenzzia</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>OPT requirements</title>
    <link>http://blog.invenzzia.org/en/post/OPT-requirements</link>
    <guid isPermaLink="false">urn:md5:8a825db4d71c176b511d8fd4cad97d53</guid>
    <pubDate>Sun, 06 Apr 2008 10:28:00 +0200</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>development</category><category>opt2</category><category>optimization</category>    
    <description>&lt;p&gt;I've found a new entry on the bugtracker recently. The author informed that he gets &quot;Nesting level too deep - recursive dependency&quot; error while running the development examples provided by the newest OPTv2 dev version. I looked at it deeper and found out that he lowered the default nesting level limit 4 times from 64 to just 16. Obviously, this is a quite drastic change and would affect not only OPT, but many other scripts as well. However, I think it is time to take a look at the OPT issues concerning the requirements, because several of them needs a deeper explaination.&lt;/p&gt;    &lt;p&gt;The optimizations implemented in OPT, mostly concern the main parser class and the compiler. The first one is the part that is loaded every time the script wants to use templates, so it must provide huge quality standards. There are no sophisticated algorithms, so the speed improvements are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To minimize the size of the code.&lt;/li&gt;
&lt;li&gt;To minimize the amount of points that try to access the hard drive.&lt;/li&gt;
&lt;li&gt;To use the fastest elements of the language.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The point is this class must be as light as possible; I would even say: almost transparent for the script.&lt;/p&gt;


&lt;p&gt;The situation is quite different, when it comes to the compiler. It is loaded from time to time, so it can be big and splitted for more files (of course without exaggeration). The key role is played by the limits set in the PHP configuration, because in the pesimistic situations, the compiler runs out of resources to complete the task. Unfortunately, some of the new features cost a lot, and if the users wanted XML tag parsing, they must face the consequences: every such tag requires its own node object in the document tree and they need some preparation tasks to be done. My role is to minimize the time and memory necessary to do this.&lt;/p&gt;


&lt;p&gt;The elements that can be exhausted during the compilation are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The stack&lt;/li&gt;
&lt;li&gt;The memory&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The algorithms used in the compiler operate on a data structure called tree, and the use lots of recursion. It consumes the stack, because the number of currently executed methods and functions grows quite fast. In PHP, the default limit for the stack depth is 64 and if you are going to use OPT, the worst you can do is to lower it to ridiculous values like &quot;16&quot; that would affect not only OPT, but also many other scripts :). However, every recursion has an imperative version, constructed for example by queues. Maybe it does not consume less memory, but at least it does not depend on the limits. Such changes have been applied to many compiler methods so far, but some of them still require my attention, because they are not so trivial:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Processing the tree by the instruction processors&lt;/li&gt;
&lt;li&gt;Expression compilation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the first one the situation is clear: we get a node of some instruction and want to process it. We find its processor and redirect the node to it. It generates some PHP code and decides, what to do with its children. By default, it wants to process them, too. Here comes the recursion and the process starts from the beginning. There are some difficulties. The algorithm is split over many classes, and the programmers may create their own. What is more, some instructions need to start the subnode processing immediately, because their next decision depends on the code generated by the children. Obviously, this eliminates queues. An elegant replacement could be made, if we had an access to the low level programming.&lt;/p&gt;


&lt;p&gt;Let's take a look, how it affects the compilation process. We have a huge template, with the tags nested up to the level 30. OPT with the compiler can take another 10 calls, and in the deepest place we have a complicated expression with brackets. To sum up, the library uses approx. 45 calls from 64 available, which is more than 70% of the limit! I know this case is quite pesimistic and in normal life such HTML documents are very rare, but it shows, how demanding the compilation can be.&lt;/p&gt;


&lt;p&gt;If we can't remove the recursion without ugly tricks which would be never accepted by the instruction authors, how we can get around it? The idea is not to remove recursion completely, but we keep it in some places. I use here the fact that the immediate access to the subnode compilation results is necessary only for some instructions, and for example the HTML tags do not need it at all. If we get a random node from the tree, we have a big chance that it would not need a recursion here. So, why don't we provide a dual version of this algorithm? By default, it is executed with a queue, but for more sophisticated needs, some nodes can switch it to recursion. Now it can happen that a tree with a depth 30 is processed in one single loop, with no recursion! I predict that in normal situations, the algorithm will consume only 3, 4 spare &quot;items&quot; in the stack, which is fully acceptable.&lt;/p&gt;


&lt;p&gt;The second issue concerns the memory usage. It's not so tragic here, but we can notice a significant rise when compared to the OPT 1.x compiler, even with using some patents from that version. The most memory is consumed by the tree. I've measured some single nodes recently and the results were from 2 kilobytes for a single node to 3 kilobytes for a node with one attribute. When the instructions start to add the PHP code to the buffers, the things are getting worse, but it happens only in some nodes in the whole template. We can safe some memory here. The objects use various arrays, which are initialized just in the beginning, for example:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;php&quot;&gt;abstract class optScannable extends optNode implements Iterator
{
	protected $subnodes = array();
&lt;/pre&gt;


&lt;p&gt;In most of the nodes, the arrays are empty, so it it no sense for them to exist all the time. I fixed the code so that it creates an array only when it is necessary. From the declarations, the &lt;code&gt;= array()&lt;/code&gt; parts were removed. The effect is quite interesting. On a single array, we safe 400 bytes. The new results are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Single node with no attributes: 1400 b.&lt;/li&gt;
&lt;li&gt;Single node with one attribute: 2350 b.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The additional memory may be safed by releasing the huge data that will not be used anymore, for example the template content.&lt;/p&gt;


&lt;p&gt;What do we have to remember, while using the new OPT, when it comes to the requirement issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;With the terribly low limits, the compiler will always crash. I thing 16 megabytes for the script (the default limit) is big enough both for the compiler and the script.&lt;/li&gt;
&lt;li&gt;The best place to run the template parsing is the end of the script. We can delete some unncessary data earlier to free some memory.&lt;/li&gt;
&lt;li&gt;The templates using the inheritance are more demanding, especially when overwriting snippets, because the compiler must keep also the old versions in the memory.&lt;/li&gt;
&lt;li&gt;The quirks mode will consume less memory (simpler tree - no XML tags), but it is not implemented yet.&lt;/li&gt;
&lt;li&gt;The compilation is run once for a long time. During the normal execution, we can forget about the limit issues etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I think this note shows, how difficult the library creation can be. The key is to know, what we can use in current place and that there is also the rest of the script which uses the same memory and has its own requirements.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/OPT-requirements#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/OPT-requirements#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/24</wfw:commentRss>
      </item>
    
  <item>
    <title>OPT 2.0.0-dev5</title>
    <link>http://blog.invenzzia.org/en/post/OPT-200-dev5</link>
    <guid isPermaLink="false">urn:md5:33bdfac78deef21d193dfecd8a90f928</guid>
    <pubDate>Fri, 21 Mar 2008 14:38:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>components</category><category>development</category><category>opt2</category>    
    <description>&lt;p&gt;The new development version became available a bit later that I planned, but on the other hand, I managed to add much more new things. The DTD issue is solved, as well as XML prologs, CDATA support and code escaping. The expression compiler is done and the programmers may use now brand new component implementation. This is a significant step towards the first beta release and the end is closer than further. There are only a few instructions to code, the rest is almost completed and works. The compiler, programmers' API and most of the stuff also works. I think of making the first real tests on my home website and creating the Open Power Forms library compatible with the new OPT.&lt;/p&gt;    &lt;p&gt;In the new OPT, I've redesigned the component design from scratch. It is much more flexible now and allows to make easily many interesting effects. The base rules are still the same, but the rest has changed. This is a sample code showing, how the component-based work with the forms is going to look like:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&amp;lt;opt:snippet name=&amp;quot;componentView&amp;quot;&amp;gt;
  &amp;lt;com:div class=&amp;quot;field&amp;quot; invalid=&amp;quot;field error&amp;quot;&amp;gt;
    &amp;lt;p&amp;gt;{$opt.component.title}: &amp;lt;opt:display /&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p class=&amp;quot;desc&amp;quot; opt:if=&amp;quot;$opt.component.description&amp;quot;&amp;gt;{$opt.component.description}&amp;lt;/p&amp;gt;
    &amp;lt;opt:onEvent name=&amp;quot;error&amp;quot; message=&amp;quot;info&amp;quot;&amp;gt;
      &amp;lt;p class=&amp;quot;error&amp;quot;&amp;gt;{@info}&amp;lt;/p&amp;gt;
    &amp;lt;/opt:onEvent&amp;gt;
  &amp;lt;/com:div&amp;gt;
&amp;lt;/opt:snippet&amp;gt;

&amp;lt;div class=&amp;quot;form&amp;quot;&amp;gt;
&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;skrypt.php&amp;quot;&amp;gt;

&amp;lt;opt:input name=&amp;quot;name&amp;quot; template=&amp;quot;componentView&amp;quot;&amp;gt;
   &amp;lt;opt:set name=&amp;quot;title&amp;quot; str:value=&amp;quot;Enter your name&amp;quot; /&amp;gt;
   &amp;lt;opt:set name=&amp;quot;description&amp;quot; str:value=&amp;quot;At least 3 letters&amp;quot; /&amp;gt;
&amp;lt;/opt:input&amp;gt;

&amp;lt;opt:input name=&amp;quot;surname&amp;quot; template=&amp;quot;componentView&amp;quot;&amp;gt;
   &amp;lt;opt:set name=&amp;quot;title&amp;quot; str:value=&amp;quot;Enter your surname&amp;quot; /&amp;gt;
   &amp;lt;opt:set name=&amp;quot;description&amp;quot; str:value=&amp;quot;At least 3 letters&amp;quot; /&amp;gt;
&amp;lt;/opt:input&amp;gt;

&amp;lt;opt:input name=&amp;quot;age&amp;quot; template=&amp;quot;componentView&amp;quot;&amp;gt;
   &amp;lt;opt:set name=&amp;quot;title&amp;quot; str:value=&amp;quot;Enter your age&amp;quot; /&amp;gt;
   &amp;lt;opt:set name=&amp;quot;description&amp;quot; str:value=&amp;quot;Scope: 10-99 years&amp;quot; /&amp;gt;
&amp;lt;/opt:input&amp;gt;

&amp;lt;div class=&amp;quot;foot&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Send&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;


&lt;p&gt;The new implementation makes use of the &lt;code&gt;opt:snippet&lt;/code&gt; instruction and template inheritance. If you had enough time, you might code the component objects, so that the field titles and descriptions will be unnecessary in the template. A component can handle events, displaying itself and its neighbourhood, managing parameters and tag attributes (we use the &lt;code&gt;com&lt;/code&gt; namespace for it). OPT contains only the component mechanism, and the components itself must be written by the end user. The reason is very simple. In order to make a useful component, we should integrate it with the input validation classes, language system, error management etc. The demands are much bigger than OPT is able and is supposed to provide. However, there will be a ready-to-use component implementation: Open Power Forms library.&lt;/p&gt;


&lt;p&gt;Unfortunately for the English manual is not started yet. Even the Polish users must use a partially-complete text, without formatting, because the new rendering system is not ready. However, we'll do everything to translate all the text together with some other materials (advices, FAQ, maybe even a tutorial?) into English, before the first final release is done. There is a team, I'll try also to ask some friends and we'll make a serious English support. Just be patient.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://www.invenzzia.org/download/opt-2.0.0-dev5.tar.gz&quot; hreflang=&quot;en&quot;&gt;Download OPT-2.0.0-dev5&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/OPT-200-dev5#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/OPT-200-dev5#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/21</wfw:commentRss>
      </item>
    
  <item>
    <title>OPT 2.0.0-dev4</title>
    <link>http://blog.invenzzia.org/en/post/OPT-200-dev4</link>
    <guid isPermaLink="false">urn:md5:53f051a3804ea8fd52e637f321aaa683</guid>
    <pubDate>Sun, 02 Mar 2008 11:28:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>OPT2</category>    
    <description>&lt;p&gt;There is a new Open Power Template development version available to download. The project begins to gel, as the main parser class is almost completed. Inspite of the output cache system mentioned earlier, I've implemented new instructions and completed the snippets. It means that all the template inheritance should work now. I hope the library will be usable by the end of this month. The real projects are really necessary to detect possible bugs and various shortcomings.&lt;/p&gt;    &lt;p&gt;In snippets, we have a new possibility to insert the parent content using the &lt;code&gt;opt:parent&lt;/code&gt; tag:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;
&amp;lt;opt:extend file=&amp;quot;test_inherited_a.tpl&amp;quot;&amp;gt;
	&amp;lt;opt:snippet name=&amp;quot;header&amp;quot;&amp;gt;
		&amp;lt;h1&amp;gt;Webmaster Of Puppets&amp;lt;/h1&amp;gt;
		&amp;lt;p&amp;gt;Here is the parent content:&amp;lt;/p&amp;gt;
		&amp;lt;opt:parent/&amp;gt;
		&amp;lt;p&amp;gt;End of the parent content&amp;lt;/p&amp;gt;
	&amp;lt;/opt:snippet&amp;gt;
&amp;lt;/opt:extend&amp;gt;
&lt;/pre&gt;


&lt;p&gt;In this case, if the &lt;em&gt;test_inherited_a.tpl&lt;/em&gt; contains another snippet with the same name, its content will be put in the place of &lt;code&gt;opt:parent&lt;/code&gt;. Such nesting works much deeper. For example, let's say that snippet also uses this tag. OPT will try to locate another parent and so on. It is even possible to put the default content of the &lt;code&gt;opt:insert&lt;/code&gt; tag, which is used to place the snippets. The code contains also a simple code to detect the infinite recursion. If the parser finds it, it returns an exception and the programmer sees a nice, red error message :).&lt;/p&gt;


&lt;p&gt;During the using of the new OPT, the new debug console should be also useful. It has been extended, compared to the similar option in OPT 1.1.x. The most significant change is splitting the list of templates to the smaller ones which show different information:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Executed templates&lt;/li&gt;
&lt;li&gt;Currently compiled templates&lt;/li&gt;
&lt;li&gt;Templates read from cache.&lt;/li&gt;
&lt;li&gt;Inherited templates - it shows all the inheritance chains, as well, as the information whether they have been recompiled or not.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Moreover, the console displays all the warnings. They are no longer put onto the screen, but available only with the debug console or error messages, if we set the proper debug level.&lt;/p&gt;


&lt;p&gt;The performance issue also looks very good. The total size of &lt;em&gt;opt.class.php&lt;/em&gt; file is about 25 KB, compared to 32 KB in the OPT 1.1.x. Currently, its size influences the performance much, as PHP must load the parser and compile it to the internal bytecode. Of course, if we parse a lot of templates, it won't be so visible, however I'm quite pleased of the effect.&lt;/p&gt;


&lt;p&gt;The package can be downloaded from &lt;a href=&quot;http://www.invenzzia.org/download/opt-2.0.0-dev4.tar.gz&quot; hreflang=&quot;en&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/OPT-200-dev4#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/OPT-200-dev4#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/18</wfw:commentRss>
      </item>
    
  <item>
    <title>The main class almost finished</title>
    <link>http://blog.invenzzia.org/en/post/The-main-class-almost-finished</link>
    <guid isPermaLink="false">urn:md5:a4135d6c62812ecd599e53cd4933d0d1</guid>
    <pubDate>Fri, 22 Feb 2008 08:59:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>OPT2</category>    
    <description>&lt;p&gt;The result of the latest works on the OPT source code is complete &lt;em&gt;opt.class.php&lt;/em&gt; file which contains (as some of the readers may know) the main parser class. I must admit that this file was more demanding that the compiler. In the second case we can afford with quite a lot. Just an idea for the algorithm and prediction if and how it will influence the rest of the code. In the case of the main class, we must pay attention to the performance. It must contain everything that is run permanently and it must be fast and small. But the number of features is getting bigger and bigger.&lt;/p&gt;    &lt;p&gt;The new development version will not be compatible with the previous ones when it comes to the programming interface. To implement the output cache system, I had to rebuild almost all of the output system. In the 1.x.x series, the concept of the output system did not exist. Either the result will be seen on the screen or put into a variable, it depended on the right method choice. There were some tricky connections which redirected everything to the right place, however it was not well designed and a bit messy. Well, such things simply must happen, if we start with keeping the similarities to Smarty, and I have to remind that in the very early times, it was one of the OPT goals. In OPTv2, there is a well-declared &lt;em&gt;ioptOutput&lt;/em&gt; interface allowing the programmer to code the output processing on his own. It is also used in the implementation of output cache system. How - it is explained below.&lt;/p&gt;


&lt;p&gt;So far, there have been two output systems: &lt;em&gt;optNetOutput&lt;/em&gt; sending everything on the screen and checking, how many templates we are going to send in the XML mode. The second one was &lt;em&gt;optReturnOutput&lt;/em&gt;, which returned the result. I added a possibility to decorate them with something else and I created &lt;em&gt;optCachedOutput&lt;/em&gt;. Its only goal is to process the cache. The features are the same as in the previous versions, but the usage is a bit different and unfortunately, the initialization is more complicated:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;php&quot;&gt;$cache = new optCachedOutput('./cache/'); // this is the cache, here we configure it
$tpl -&amp;gt; register(OPT_OUTPUT, 'my_cache', $cache);
$tpl -&amp;gt; decorate(OPT_OUT_SCREEN, 'my_cache');
$tpl -&amp;gt; decorate(OPT_OUT_RETURN, 'my_cache');

if(!$cache -&amp;gt; isCached('template.tpl', 'some_id'))
{
  // data generation
}

$cache -&amp;gt; setCache(5, 'some_id'); // turn the cache on for 5 seconds
$tpl -&amp;gt; parse('template.tpl', 'my_cache');
&lt;/pre&gt;


&lt;p&gt;I'll try to shorten it and make simpler the first lines of the code, because I don't like them, too. Moreover, I must check if I've made the decoration in the right way (according to the logic).&lt;/p&gt;


&lt;p&gt;The support for plugins is not fully completed yet. The only ready part is placed in &lt;em&gt;opt.class.php&lt;/em&gt; file. The rest is moved somewhere else, which should improve the performance. Like in OPT 1.1.3, there will be a possibility to set many plugin directories, but the parser will not require them to be writeable. There were thrown some files describing the content and allowing to include everything without scanning all the directory. As we know, the more includes, the less performance and some people can produce more plugins than all the files in my framework :). The new OPT will try to link all these files into one, mega-file containing everything we need. By the way, I'll have also a new algorithm for the OPT Toolset sequel, which will be used now for all the libraries, not only OPT.&lt;/p&gt;


&lt;p&gt;The last issue concerns the available function set for the templates. Stormfly has recently written on his blog that OPT 1.1.x it was quite senseless and in fact, he was right. I took a look, what Smarty offers and it turned out that it has some nice and useful functions. The first list looks like that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;spacify&lt;/em&gt; - puts a string between every two neighbour characters in the text.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;indent&lt;/em&gt; - makes an indentation in the text.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;truncate&lt;/em&gt; - reduces the text to the specified length (allowing not to splitting the words)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;strip&lt;/em&gt; - reduces all the white character groups to a single character&lt;/li&gt;
&lt;li&gt;&lt;em&gt;capitalize&lt;/em&gt; - equivalent to ucfirst()&lt;/li&gt;
&lt;li&gt;&lt;em&gt;upper&lt;/em&gt; - equivalent to strtoupper()&lt;/li&gt;
&lt;li&gt;&lt;em&gt;lower&lt;/em&gt; - equivalent to strtolower()&lt;/li&gt;
&lt;li&gt;&lt;em&gt;countWords&lt;/em&gt; - equivalent to str_word_count()&lt;/li&gt;
&lt;li&gt;&lt;em&gt;countChars&lt;/em&gt; - equivalent to strlen()&lt;/li&gt;
&lt;li&gt;&lt;em&gt;money&lt;/em&gt; - equivalent to money_format(), but the settings can be written in the OPT configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;number&lt;/em&gt; - equivalent to number_format(), but the settings can be written in the OPT configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;wordWrap&lt;/em&gt; - equivalent to word_wrap()&lt;/li&gt;
&lt;li&gt;&lt;em&gt;replace&lt;/em&gt; - equivalent to str_replace()&lt;/li&gt;
&lt;li&gt;&lt;em&gt;regexReplace&lt;/em&gt; - equivalent to preg_replace(), but the parameter order is changed.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;date&lt;/em&gt; - equivalent to date() :)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;firstof&lt;/em&gt; - returns the first non-empty element from the specified ones.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;nl2br&lt;/em&gt; - equivalent to nl2br() :)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;array&lt;/em&gt; - creating arrays on the template side&lt;/li&gt;
&lt;li&gt;&lt;em&gt;build&lt;/em&gt; - it was called &quot;apply()&quot; in the previous versions, but I still don't know, whether I keep this name or not.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The set contains no escaping functions, because the compiler is able to put them on his own in most of the places. There will be a possibility to escape something manually, but it won't be done through functions. Anyway, the point is the compiler must know, what is escaped. Otherwise it may add additional function call and this would produce a complete mess on the screen.&lt;/p&gt;


&lt;p&gt;To sum up, I've written so much functionality that I haven't tested all of them yet. I don't know if something works, however I don't expect any revelations. Many of the algorithms are reimplementations of the same code from OPT 1.1.x.  The next dev version will be available in the nearest days.&lt;/p&gt;


&lt;p&gt;Some statistics for the end:&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;- &lt;em&gt;opt.class.php&lt;/em&gt; - 24 KB and still growing. In OPT 1.1.x, this file was 8 KB bigger, but offered less functionality.&lt;br /&gt;
- &lt;em&gt;opt.compiler.php&lt;/em&gt; - 65 KB and still growing.&lt;br /&gt;
- &lt;em&gt;opt.instructions.php&lt;/em&gt; - 25 KB and still growing.&lt;/p&gt;&lt;/blockquote&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/The-main-class-almost-finished#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/The-main-class-almost-finished#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/14</wfw:commentRss>
      </item>
    
  <item>
    <title>OPT 2.0.0-dev3</title>
    <link>http://blog.invenzzia.org/en/post/OPT-200-dev3</link>
    <guid isPermaLink="false">urn:md5:9843f60585ccf157ee19a973402b4cd2</guid>
    <pubDate>Fri, 15 Feb 2008 13:26:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>OPT2</category>    
    <description>&lt;p&gt;According to the my announcement from the last week, the development versions are going to appear much faster than before. This is the first of such events. The third dev of OPT 2.0.0 is ready to download. This time, I've paid much attention to the attribute processing. They can do a lot of interesting things with the tags they've been added to. The earl implementation has been ready so far - there were even examples showing the &quot;opt:section&quot; working. But to satisfy both me and probably other programmers, I had to extend it.&lt;/p&gt;    &lt;p&gt;Here are some examples showing, what can be done now. Let's start from something simple. In OPT, we use curly brackets to put expressions into a text, like:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;text text text {$block} text text text
&lt;/pre&gt;


&lt;p&gt;There is also &lt;code&gt;opt:put&lt;/code&gt; instruction, which does the same for the first time we see it:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;text text text &amp;lt;opt:put value=&amp;quot;$block&amp;quot;/&amp;gt; text text text
&lt;/pre&gt;


&lt;p&gt;However, it is an instruction, not curly brackets. It means we can make some nice things with it using attributes. Let's say we want to display something like &quot;Value 1 / Value 2 / Value 3&quot;. We will use &lt;code&gt;opt:put&lt;/code&gt;, a section and a separator:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;opt:put value=&amp;quot;$section.value&amp;quot; opt:section=&amp;quot;section&amp;quot; str:separator=&amp;quot; / &amp;quot;/&amp;gt;&amp;lt;/p&amp;gt;
&lt;/pre&gt;


&lt;p&gt;As we see, such section affects also the tag which it was linked to and we can put the values of section elements in the attributes. The separator accepts expressions by default, but if we don't like writing &lt;em&gt;separator=&quot;'something'&quot;&lt;/em&gt; (double, and then a single quote), we can just switch the namespace to &quot;str&quot;.&lt;/p&gt;


&lt;p&gt;The implementation of reversed quotes is also ready. Compared to the previous versions, they change their function. Now it is the programmer who can give them a meaning and program them to do what he wants. It can be done by writing a simple function and giving its name to the parser. A sample use is an elegant implementation of language system a'la gettext:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;&amp;lt;p&amp;gt;{`Some useful information...`}&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;{`Author:`} {$author}&amp;lt;/p&amp;gt;
&lt;/pre&gt;


&lt;p&gt;This is the last of the changes. As we have an XML compiler, we need some special instructions that allow to manage the tree directly, for example by adding an attribute with a variable name. OPT is going to provide two instructions for this task: &lt;code&gt;opt:tag&lt;/code&gt; and &lt;code&gt;opt:attribute&lt;/code&gt;. The second one has been already added to the newest dev. We can use it to read the attribute name from the block:&lt;/p&gt;
&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;&amp;lt;div&amp;gt;
  &amp;lt;opt:attribute name=&amp;quot;$some_name&amp;quot; value=&amp;quot;$some_value&amp;quot;/&amp;gt;
  body...
&amp;lt;/div&amp;gt;
&lt;/pre&gt;


&lt;p&gt;This is not the end - connected with sections, we get a powerful tool to add a lot of new attributes:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;&amp;lt;div&amp;gt;
  &amp;lt;opt:attribute name=&amp;quot;$attr.name&amp;quot; value=&amp;quot;$attr.value&amp;quot; opt:section=&amp;quot;attr&amp;quot;/&amp;gt;
  body...
&amp;lt;/div&amp;gt;
&lt;/pre&gt;


&lt;p&gt;If we send the following table to this template: &lt;code&gt;array(0 =&amp;gt; array('name' =&amp;gt; 'class', 'value' =&amp;gt; 'dude'), array('name' =&amp;gt; 'id', 'value' =&amp;gt; 'lol'))&lt;/code&gt;, the result will be:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;&amp;lt;div class=&amp;quot;dude&amp;quot; id=&amp;quot;lol&amp;quot;&amp;gt;
  body...
&amp;lt;/div&amp;gt;
&lt;/pre&gt;


&lt;p&gt;Unfortunately, the English manual is not started yet, but it will be ready before the first stable release.&lt;/p&gt;


&lt;p&gt;Download: &lt;a href=&quot;http://blog.invenzzia.org/en/post/&quot; hreflang=&quot;en&quot;&gt;http://www.invenzzia.org/download/opt-2.0.0-dev3.tar.gz&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/OPT-200-dev3#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/OPT-200-dev3#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/11</wfw:commentRss>
      </item>
    
  <item>
    <title>New dev</title>
    <link>http://blog.invenzzia.org/en/post/New-dev</link>
    <guid isPermaLink="false">urn:md5:a5d8cceafecfd239ba372c9cd993b8be</guid>
    <pubDate>Sat, 09 Feb 2008 11:02:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>OPT2</category>    
    <description>&lt;p&gt;The website now has the &quot;Download&quot; page. In it, you can find a new development version of Open Power Template. It also contains a simple script &quot;docgen&quot; which we use for automated generation of the DocBook manuals. The new development versions should appear now much more often than before. In case of many new features, they might appear even every 2-3 days. The reason why this was impossible in the past was the time. The process was not automated and it takes a while to prepare such archive (for example - it takes a couple of hours to publish new OPT 1.x version on the Internet).&lt;/p&gt;    &lt;p&gt;The pack contains everything I've implemented for last month:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nearly completed sections.&lt;/li&gt;
&lt;li&gt;Separators.&lt;/li&gt;
&lt;li&gt;&quot;For&quot; and &quot;Foreach&quot; loops.&lt;/li&gt;
&lt;li&gt;Mostly completed template inheritance.&lt;/li&gt;
&lt;li&gt;HTTP header management.&lt;/li&gt;
&lt;li&gt;Partially completed prolog parser.&lt;/li&gt;
&lt;li&gt;Some fixes in the compiler.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &quot;/dev&quot; directory contains some scripts that are used to test the new features. There are also unit tests: a complete set to test the expression parser and a part of the API test. There will be also a one to process the instructions, however the whitespace characters cause many problems, when it comes to prepare the files. If we try to compare the generated content with the expected result, we have to watch out on every space or line break. Otherwise the test fails, so you must be very patient to write a simple, stupid test. But I think this issue will be solved. To work, the tests require &quot;phpUnit 3&quot; package available in PEAR.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/New-dev#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/New-dev#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/10</wfw:commentRss>
      </item>
    
  <item>
    <title>Template inheritance</title>
    <link>http://blog.invenzzia.org/en/post/Template-inheritance</link>
    <guid isPermaLink="false">urn:md5:18f9793a8c4c1405788e24861aa04ef1</guid>
    <pubDate>Sat, 02 Feb 2008 17:03:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>OPT2</category>    
    <description>&lt;p&gt;Unsually, the final HTML code of the website is composed of several smaller templates containing smaller pieces of it. There are many techniques of combining them. In PHP template engines, the most popular are two forms: manual execution of the templates from the script side and the &lt;em&gt;include&lt;/em&gt; directive. Similar solution can be found in OPT 1.x, however in the new version, it should be forgotten - unless we use the quirks mode, the parser does not let us to call the &lt;em&gt;parse()&lt;/em&gt; method more than once. In the beginning, I planned to replace it by extending inclusion with &quot;sequences&quot; - a groups of templates to include with their own variables and cache settings. However, one day I was asked on my blog by Coldpeer, whether OPT will support template inheritance. I googled for a while, I looked at it and thought it might be cool. That's how the implementation began.&lt;/p&gt;    &lt;p&gt;As far as I know, template inheritance appeared for the first time in the Python framework, Django. The idea is taken from the object oriented programming, where we can extend classes by adding new methods, fields and overwriting the existing ones. Here it looks similar. We have a main template where we mark some characteristic places and fill them with a default content. Another template extends the main one and is able to overwrite that places with its own content. There can go the next template, and next...&lt;/p&gt;


&lt;p&gt;I was quite surprised that a lot of required functionality already exists in OPT 1.x - the &lt;em&gt;bind&lt;/em&gt; and &lt;em&gt;insert&lt;/em&gt; instructions allowed to move whole template parts somewhere else (as well as their functionality, not only the result, like in Smarty's &lt;em&gt;capture&lt;/em&gt;), even if the destination was in the other template. Unfortunately, there was no proper detection, whether one of the files was modified, so unsually the parser decided that the main part needs to be compiled, but the template with snippet definitions - does not. As a result, the places remained empty, although they should not. The development of such system for OPT 2.0 was quite complicated. You do not have to check just the template you've called, whether it is modified. You must also look at all the templates it inherits. Yesterday, I decided to solve this problem definietly and a couple of hours ago everything seemed to work properly:&lt;/p&gt;


&lt;p&gt;The base template (&lt;em&gt;test_inherited_a.tpl&lt;/em&gt;):&lt;/p&gt;
&lt;pre name=&quot;code&quot; class=&quot;html&quot;&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;
	   &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;

&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; lang=&amp;quot;en_US&amp;quot; xml:lang=&amp;quot;en_US&amp;quot;&amp;gt;
 &amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;Instruction test: snippet and insert&amp;lt;/title&amp;gt;
 &amp;lt;/head&amp;gt;
 &amp;lt;body&amp;gt;
  &amp;lt;opt:insert snippet=&amp;quot;header&amp;quot;&amp;gt;
   &amp;lt;h1&amp;gt;I'm a standard header&amp;lt;/h1&amp;gt;
   &amp;lt;p&amp;gt;Foo bar joe&amp;lt;/p&amp;gt;  
  &amp;lt;/opt:insert&amp;gt;
  
  &amp;lt;hr/&amp;gt;
  
  &amp;lt;opt:insert snippet=&amp;quot;content&amp;quot;&amp;gt;
  	&amp;lt;p&amp;gt;Well, i'm also a standard content.&amp;lt;/p&amp;gt;
  
  &amp;lt;/opt:insert&amp;gt;
  
  &amp;lt;hr/&amp;gt;
  
  &amp;lt;opt:insert snippet=&amp;quot;footer&amp;quot;&amp;gt;
  	&amp;lt;p&amp;gt;And I'm a footer.&amp;lt;/p&amp;gt;  
  &amp;lt;/opt:insert&amp;gt;
  
  &amp;lt;p&amp;gt;&amp;amp;copy; Pasteright 2008 by LMAO, It seems to work!&amp;lt;/p&amp;gt;
 &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;


&lt;p&gt;The extending template (&lt;em&gt;test_inherit_1.tpl&lt;/em&gt;):&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;
&amp;lt;opt:extend file=&amp;quot;test_inherited_a.tpl&amp;quot;&amp;gt;
	&amp;lt;opt:snippet name=&amp;quot;header&amp;quot;&amp;gt;
		&amp;lt;h1&amp;gt;Webmaster Of Puppets&amp;lt;/h1&amp;gt;
	&amp;lt;/opt:snippet&amp;gt;

	&amp;lt;opt:snippet name=&amp;quot;content&amp;quot;&amp;gt;
		&amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus ut tellus id nulla adipiscing eleifend. Sed dictum accumsan ante. Nullam at nisl vitae elit aliquet fringilla. Praesent egestas eros eget tellus. Praesent id odio a sapien rhoncus vehicula. Nunc fringilla, diam eget euismod tempor, tortor metus tincidunt sapien, eu cursus magna tellus at risus. Praesent non tellus eget magna facilisis pulvinar. Praesent libero mi, adipiscing a, pharetra eget, condimentum sodales, mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Donec ac elit. Duis iaculis tortor a metus. Aliquam id purus et eros faucibus fringilla. Praesent quis quam. In lectus urna, fringilla sit amet, iaculis eget, aliquet ac, quam. Donec vulputate dui sit amet lectus. Aenean tempor, orci at pretium ornare, tortor tortor venenatis ligula, eget blandit nisi risus eget dolor. Duis nunc neque, sodales porta, viverra non, tristique eu, sem. Curabitur magna neque, blandit ullamcorper, congue quis, tristique ut, felis.&amp;lt;/p&amp;gt;
	&amp;lt;/opt:snippet&amp;gt;

	&amp;lt;opt:snippet name=&amp;quot;footer&amp;quot;&amp;gt;
		&amp;lt;p&amp;gt;Bye!!!&amp;lt;/p&amp;gt;
	&amp;lt;/opt:snippet&amp;gt;
&amp;lt;/opt:extend&amp;gt;
&lt;/pre&gt;


&lt;p&gt;Some PHP code:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;php&quot;&gt;&amp;lt;?php

	define('OPT_DIR', '../lib/');
	require(OPT_DIR.'opt.class.php');

	try
	{
		$tpl = new optClass;
		$tpl -&amp;gt; sourceDir = './templates/';
		$tpl -&amp;gt; compileDir = './templates_c/';
		$tpl -&amp;gt; stripWhitespaces = false;
		$tpl -&amp;gt; printComments = false;
		$tpl -&amp;gt; setup();
		
		$tpl -&amp;gt; parse('test_inherit_1.tpl');
	}
	catch(optException $e)
	{
		optErrorHandler($e);
	}
?&amp;gt;
&lt;/pre&gt;


&lt;p&gt;And the result can be admired below:&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://blog.invenzzia.org/public/images/template_inheritance.png&quot;&gt;&lt;img src=&quot;http://blog.invenzzia.org/public/images/.template_inheritance_m.jpg&quot; alt=&quot;Template inheritance&quot; style=&quot;display:block; margin:0 auto;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Some facts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If we modify any of the templates in the inheritance chain, the parser will notice it and recompile proper files.&lt;/li&gt;
&lt;li&gt;If we remove any of &quot;opt:snippet&quot; instructions, the default content of &quot;opt:insert&quot; will be displayed.&lt;/li&gt;
&lt;li&gt;There is a possibility to overwrite an existing snippet by the more important template. You will be also able to call the parent content, however it is not implemented yet (some kind of &quot;opt:parent&quot; instruction).&lt;/li&gt;
&lt;li&gt;It can be mixed with &quot;opt:include&quot; and &quot;opt:sequence&quot; (the sequence system briefly mentioned in the introduction).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What is more, it's quite possible that the template inheritance will work faster than traditional way, although it will consume more disk space. Simply, if we have an inheritance like this: &quot;A extends  B extends C&quot;, the compiler puts all their code in the file belonging to the &quot;A&quot; template. It reduces the amount of disk operations (the execution of one bigger template is faster than the same content in five files). On the other hand, by default OPT still checks the file modification times, but fortunately, the number of tests is also smaller. The exact results will be available, when some benchmarks are done. Before we end, I'll say that two days ago I made a small test (a simple list with 15 items). The result:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;OPT 1.x: 1850 req/s&lt;/li&gt;
&lt;li&gt;OPT 2.0: 2100 req/s&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Well, it looks promising, but we have to remember that the new &lt;em&gt;opt.class.php&lt;/em&gt; file still does not have half of the options, which obviously will increase its size. Moreover, some optimizations are not implemented yet. But in fact, you can assume that the new features should not destroy the performance, and there is a chance that it will be even better.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/Template-inheritance#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/Template-inheritance#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/6</wfw:commentRss>
      </item>
    
  <item>
    <title>Deeper processing</title>
    <link>http://blog.invenzzia.org/en/post/Deeper-processing</link>
    <guid isPermaLink="false">urn:md5:d6abe77b1e5105e2840bb0cc54643046</guid>
    <pubDate>Thu, 31 Jan 2008 13:42:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>Open Power Forms</category>    
    <description>&lt;p&gt;The last project I've created using Open Power Forms, shown some weaknesses of the current form implementation. There were some forms allowing a mass addition of many records in the following way: a table, in the columns the following fields: Name, Surname, PESEL number, etc. The numer of rows was 30, so the user is able to add 30 people to the database with one form. The adaptation of the &lt;em&gt;map()&lt;/em&gt; method to my problem was not too hard; in fact it seemed that &lt;em&gt;opfArrayContainer&lt;/em&gt; solved everything. But then the form renderer connected with Open Power Template went off.&lt;/p&gt;    &lt;p&gt;My code looked like that:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;php&quot;&gt;$this -&amp;gt; map('names', new opfArrayContainer(
	new opfConstraint(MAP_TYPE, TYPE_STRING),
	new opfConstraint(MAP_LEN_GT, 2)
), OPF_OPTIONAL);
$this -&amp;gt; map('surnames', new opfArrayContainer(
	new opfConstraint(MAP_TYPE, TYPE_STRING),
	new opfConstraint(MAP_LEN_GT, 2)
), OPF_OPTIONAL);
$this -&amp;gt; map('pesels', new opfArrayContainer(
	new sConstraint(MAP_PESEL)
), OPF_OPTIONAL);
&lt;/pre&gt;


&lt;p&gt;In other words, the script must have received for example the &quot;names&quot; field, which was an array of 30 elements with the names. If the user made a mistake while filling in the form, the form renderer did not have a clue, which component to display as invalid (in this case it should be colored red instead of green). Finally, I added a support for the &lt;em&gt;IGNORE_OPF_ERRORS&lt;/em&gt; constant so that shut it up and just display everything without all this color rotation stuff.&lt;/p&gt;


&lt;p&gt;Of course, it is not possible to keep this problem unsolved in the &quot;public&quot; releases and I decided to look for solution. It would be nice, if the improvement easily matched to the code, as well as was intuitive. It's not a problem to add something in 20 minut and a month later self-wishing a rapid death. The best solutions are simple and effective, so I started to think, how to describe a form with some definitions and transformations, so that it would be possible to construct every form and process it with OPF. My idea is to go somewhere deeper and remove distinguishing between forms and form elements. The reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Both have a value (in the form case we define it as a set of subelement values).&lt;/li&gt;
&lt;li&gt;Both have a state.&lt;/li&gt;
&lt;li&gt;Both can be processed.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;/pre&gt;

&lt;p&gt;Now we can easily treat a form as an element which is capable of storing other fields. If we try to build our form described above, it will look like this: we create a form for a single person: name, surname, PESEL, etc. Next, we put it into a bigger form and order to loop up to 30 times. We can also achieve an effect of looping a single field, like it was possible with &lt;em&gt;opfArrayContainer()&lt;/em&gt; so far. We just put in such loop not a form, but a single element.&lt;/p&gt;


&lt;p&gt;Well, now the problem is, how to render it :). However, I don't think it will be complicated, especially if I look at the new Open Power Template.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/Deeper-processing#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/Deeper-processing#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/3</wfw:commentRss>
      </item>
    
</channel>
</rss>