Highlighted

Fragments - how to select fragments depending on data in input xml file

Avatar

Guest

04-06-2008

Hi, <br />Having probs trying to figure out how I can select certain fragments which are dependent on data in the input xml file. For example, if xml<name> = 'ABC' then select Frag1; if xml<name> = 'XYZ' then select Frag2<br /><br />Any help would be greatly appreciated.<br />Thks, S.

Replies

Highlighted

pguerett

05-06-2008

You will have to have all fragments on your design ...then wrap them in a subformset. Once the subformset appears then on the Object/SubformSet palette you can choose the type as "Select One Subform from Alternatives". Then Edit alternatives - the Edit Data Nominated Subforms panel appears. You willl want the choose Subform using Expression option. Then you can add an expression to evaluate (note the language selector) that indicates when you want the subform to appear. The Bindings will point to the datadom so you can point to specifoc field elements in your case or if you have a schema then you can drill down to the specific node.



Let me know how it works for you.