Google Docs already had an HTML import/export API, which allowed you to download a document, make changes, and save those changes back again. That would allow you to implement any kind of templating you like. This API just makes it slightly easier and more visible.