xmlWriter.writeTag(CompoundDataFactoryModule.NAMESPACE, "compound-datasource", rootAttrs, XmlWriterSupport.OPEN);
for (int i = 0; i < compoundDataFactory.size(); i++)
{
final DataFactory df = compoundDataFactory.get(i);
final BundleDataFactoryWriterHandler writerHandler = BundleWriterUtilities.lookupWriteHandler(df);
if (writerHandler == null)
{
throw new BundleWriterException("Unable to find writer-handler for data-factory " + df.getClass());
}
final String file = writerHandler.writeDataFactory(bundle, df, state);
if (file == null)
{
throw new BundleWriterException("Data-factory writer did not create a file for " + df.getClass());
}
final String refFile = IOUtils.getInstance().createRelativePath(file, fileName);