Hi,
I need to output the following xml (<personnes> are referenced in <roles>)
<?xml version="1.0" encoding="ISO-8859-15"?>
<data>
<destinataire oneattribute="blabla"/>
<personnes>
<personne ID_personne="Contrat_1_personne1" anotherattribute="X"/>
<personne ID_personne="Contrat_2_personne1" anotherattribute="Y"/>
<personne ID_personne="Contrat_2_personne2" anotherattribute="Z"/>
</personnes>
<contrats>
<contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto">
<roles>
<role ref_ID_personne="Contrat_1_personne1" code_role="S"/>
</roles>
<support_composants>
<support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/>
<support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/>
</support_composants>
</contrat>
<contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto">
<roles>
<role ref_ID_personne="Contrat_2_personne2" code_role="S"/>
<role ref_ID_personne="Contrat_2_personne1" code_role="S"/>
</roles>
<support_composants>
<support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/>
<support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/>
<support_composant ID_support_composant="Produit C" ref_ID_support_info_generale="ISIN_Produit C"/>
</support_composants>
</contrat>
</contrats>
</data>
I have no difficulties to generate independantly or combined in the same input all the nodes in rows but I am struggling to generate the output.
I tried several solutions using tMaps, tXMLMaps (with lookups) + tFileOutputXML but cannot achieve my aim.
One of the last I have tried was to generate two different xml for <role> and <support_composant> :
<?xml version="1.0" encoding="ISO-8859-15"?>
<contrats>
<contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto">
<roles>
<role ref_ID_personne="Contrat_1_personne1" code_role="S"/>
</roles>
</contrat>
<contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto">
<roles>
<role ref_ID_personne="Contrat_2_personne2" code_role="S"/>
<role ref_ID_personne="Contrat_2_personne1" code_role="S"/>
</roles>
</contrat>
</contrats>
<?xml version="1.0" encoding="ISO-8859-15"?>
<contrats>
<contrat ID_contrat="Contrat_1" num_contrat="Contrat_1Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto">
<support_composants>
<support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/>
<support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/>
</support_composants>
</contrat>
<contrat ID_contrat="Contrat_2" num_contrat="Contrat_2Num" ref_ID_produit="Fonds" ref_ID_conseiller="conseillerToto">
<support_composants>
<support_composant ID_support_composant="Produit A" ref_ID_support_info_generale="ISIN_Produit A"/>
<support_composant ID_support_composant="Produit B" ref_ID_support_info_generale="ISIN_Produit B"/>
<support_composant ID_support_composant="Produit C" ref_ID_support_info_generale="ISIN_Produit C"/>
</support_composants>
</contrat>
</contrats>
And I cannot mix them, I think I'm losing myself in the loops and grouping features...
Anyone has a clue?
Thanks