Added transform option

To allow document manipulation before publishing.