def __init__(self, config, schema, clean=True):
self._config = None  <EOL>self._xml = None  <EOL>self._batches = OrderedDict()  <EOL>self._batch_totals = OrderedDict()  <EOL>self.schema = schema<EOL>self.msg_id = make_msg_id()<EOL>self.clean = clean<EOL>config_result = self.check_config(config)<EOL>if config_result:<EOL><INDENT>self._config = config<EOL>if self.clean:<EOL><INDENT>from text_unidecode import unidecode<EOL>self._config['<STR_LIT:name>'] = unidecode(self._config['<STR_LIT:name>'])[:<NUM_LIT>]<EOL><DEDENT><DEDENT>self._prepare_document()<EOL>self._create_header()<EOL>
Constructor. Checks the config, prepares the document and
builds the header.
@param param: The config dict.
@raise exception: When the config file is invalid.