public function createAddDocumentXmlFragment(
		$rawDocuments,
		$allowDups = false,
		$overwritePending = true,
		$overwriteCommitted = true,
		$commitWithin = 0
	) {
		$dupValue = !$allowDups ? 'true' : 'false';

		$commitWithin = (int) $commitWithin;
		$commitWithinString = $commitWithin > 0 ? " commitWithin=\"{$commitWithin}\"" : '';

		$addXmlFragment = "<add overwrite=\"{$dupValue}\"{$commitWithinString}>";
		$addXmlFragment .= $rawDocuments;
		$addXmlFragment .= '</add>';

		return $addXmlFragment;
	}