Vacaloura ,
My thought
u can store Document object directly in the Xml database ..
if u have a html like this
<html>
<head> </head>
<body>
~~~~~~~Content ~~~~~~~~~~~~~
</body>
</html>
Layout document object should have two nodes - node1 will have first half of the html code
<html>
<head> </head>
<body>
- node2 can have the second half </body> </html>
based on this u can get the Layout ......
so the content can be appended .....
Regards , Hari.