Finally, STL defines two XML elements, stl:block and stl:inline, which will be committed when processing the template.
They are useful when we want to apply the stl:if or stl:repeat attributes to a block of XML that does not match an XML element. For example we may rewrite the snippet from the previous section this way:
<stl:block repeat="task tasks">
<h4>${task/title}</h4>
<p>${task/description}</p>
</stl:block>
To get this output:
<h4>Finish the Documentation</h4>
<p>Documentation is very important</p>
<h4>Release 1.0</h4>
<p>And rejoice</p>
The difference between the two elements is that stl:block is a block element while stl:inline is an inline element (see the HTML documentation to learn what this means exactly1).
The reason we make this difference is because it has an impact on the localization of the templates.
Footnotes