Trying to find templating engine library of markup generating content

I am currently working on a project that I am going to publish on github.

It’s roughly a library of templating engine macros and blocks to send collections of data (similar to a JSON format) and it builds the HTML favouring HTML+RDFa with abstraction of the CSS schema for implementation using this “framework of things”.

My question is mostly if any of you guys had been aware of already made such libraries.

What I am working on:

The main idea is to be able to exchange content, take from external source, cache in a “serialized” but text only (readable) way, then generate the html in the shema you want.

If you want to see in detail the big picture I want to attain using what I am searching, I suggest you look on the project manifest here.

Where I am at:

My current implementation is made in Twig using Symfony2/Doctrine2 with a WordPress database.

For the moment I have my site (not stable yet) which implements partly the first and the third part, you can see the code of the first part in this github repo branch, you can see how I am architecturing in this Wiki page.

So far, for the third part, I have only a few patterns using and and I am abstracting the css vocabulary out of it and making sure the templating library is as DRY as possible.

When I will have more than an incomplete BlogPosting+UserComments macros I will open the project on github.

Your input

As I said, I am mostly wondering if you have knowledge of any such implementation of set of macros that represents html in micro formats, be it in Python Django templating language, Mustach, Hogan, or anything.