Obtree (renamed Livelink WCM) was a bit like this. Templates were entered as a nested tree of objects with fragments of XML/HTML. Server side scripting was based around Mozilla's Spidermonkey engine with some additional libraries for database access etc.
Users used a GUI editor with administrator defined styles that were stored as XML objects in the database.
The main problems: it was closed source enterprise product with a price tag to match; the company that made it got taken over and now the product is at "end of life" to be replaced by something from a different bought in company; the authoring side could be buggy. It less us do a pure CSS design back in 2003 though, whereas a lot of CMS back then seemed to force you down a table design route.