Constructing document type dynamically

Need to understand the adapter’s ability to dynamically build the document type dynamically while executing an integration component.

Usage: Dependent the data received (external resource or other adapters), would like to construct the document type within the adapter during execution time and publish the document with a different name (not the same as the pre-defined document created during development time).