Jimmy,
Its not really clear what you are trying to do by storing smarty templates in a db. That defeats the purpose of using smarty. Smarty gives you lots of power with its own caching mechanism and lots of control over where and how the cache is stored and used. You do this by simply extending the smarty class to one of your own and setting the caching values and locations in your new class.
Its important to remember that a cached smarty template is live php code not pure html or xml like you get with some systems.
If you want pieces of documents stored in XML then store that in a db and include it in your smarty template as a variable or use a section/sectionelse clause in the template to display it. Php should do a good job of parsing it.
If you want its also very easy to extend smarty with your own code. Perhaps creating a function based off of the foreach/forelse smarty function that does xsl transforms for sections of xml from your database would work great. That way you can store the xsl in the db and your xml or call the xml from an xml enabled database. Your smarty function would then take the xml handed to it and apply the transform.
In your template:
If you do this correctly then that should be all their is to it. Remember to use properly formatted xml island syntax somewhere in the smarty function definition or allow it to be wrapped around the function in the template.
Best of luck!