You said you wanted comments, so even though I don't generate much pdf, here goes.
I don't like writing in XML. It's ok as a data interchange language in which case I use TT to fill in the variable bits. Coding in XML is painful (I've used ANT and XSLT). Please don't make me use it for coding.
I like the idea of a TT plugin or several of them. There is always an advantage to a system people understand and like. But your third option might work too. Perhaps you can conceive of a little language which is easy to write and parse that is still flexible. I've recently been at work on a little language which describes web apps. It uses simple named blocks. Your situation is more complex, but maybe something like that could work.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.