Hi,
I currently use Templetor to create pdf-files out of an xml-document (more
exactly: rml). To make it possible for non-programmers to write templates
i've a nice feature idea:
let me give you an example:
This is a snippet out of this document - as you can see a loop:
> <blockTable colWidths="161.0,161.0,161.0" style="Tabelle1">
$for c in ["a", "b", "c", "d"]:
> <tr>
> <td>
> <para style="Table Contents">${loop.index}. Zeile:</para>
> </td>
> <td>
> <para style="Table Contents">$c</para>
> </td>
> <td>
> <para style="Table Contents">escaping $$</para>
> </td>
> </tr>
</blockTable>
the for-loop has to start before the <tr> element - therefore it cannot be
entered in openoffice.
It would be cool to do something like that:
<blockTable colWidths="161.0,161.0,161.0" style="Tabelle1">
<tr>
> <td>
> <para style="Table Contents">*$:parent.tr{for c in ["a", "b",
> "c", "d"]:}*${loop.index}. Zeile:</para>
</td>
> <td>
> <para style="Table Contents">$c</para>
> </td>
> <td>
> <para style="Table Contents">escaping $$</para>
> </td>
> </tr>
</blockTable>
I didn't think a lot 'bout syntax, but I think this gives you the idea:
the '$:parent' should advice Templetor to the parent element of given type.
Therefore the for-loop is moved just before the parent <tr> and the
document is perfectly editable in OpenOffice.
What do you guys think?
Hope you like it.
Thanks, Florian.
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/webpy/-/zKkLevELYeYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.