Ack, sorry messed up on the topic.
It has be based on an external Excel or CSV, and the output should be multiple XML files.
Hi,
How about using two writers? Just branch the feature flow into two streams, and make each writer write required attributes only.
Takashi
Hi,
Yes Takashi's suggestion is the easiest and most efficient, its just a matter of removing/keeping the correspoinding attribues.
Itay
The thing is, the writers are dynamic. If I add a field in the mapping Excel, I want it to be mapped to the desired XML, and to be added as an attribute.
Have you tried adding the xls as a resource and use it in the writer dynamic schema definition?
My idea was to use an Excel file with the mapping:
Source_feature,Target_feature,attribute,attribute_type
Table_source,Table_export_1,ID,fme_decimal(10,0)
Table_source,Table_export_1,CATEGORY,fme_varchar(30)
Table_source,Table_export_2,ID,fme_decimal(10,0)
Table_source,Table_export_2,TYPE,fme_varchar(30)
Table_source,Table_export_2,REMARK,fme_varchar(50)
Thus mapping the features and attributes. I don't have access to the target XML files, so I can't use them as a template. If the Excel changes, I'll receive a new one and I'll have to run the FME script again.