6 Replies Latest reply on Aug 5, 2008 12:36 PM by Jasmin Charbonneau

    xml

    (jerome_dinnat) Level 1
      Hi, <br /><br />In a process I have two forms with the same xml schema. I need to copy nodes from the formA to the formB.<br /><br />My problem is in my xml schema I have nodes with maxOccurs = unbounded and I want to pass to the formB only a few of this nodes to the formB.<br /><br />exemple : <br /><br /><FormA><br />   <InfoN><br />      ...<br />   </InfoN><br />   <InfosFils><br />       <login>Jerome</login><br />       ...<br />   </InfosFils><br />   <InfosFils><br />       <login>Marc</login><br />       ...<br />   </InfosFils><br />   <InfosFils><br />       <login>Mikael</login><br />       ...<br />   </InfosFils><br />   <InfosFils><br />       <login>Linda</login><br />       ...<br />   </InfosFils><br /></FormA><br /><br />I want to pass only the nodes <InfosFils> for jerome and linda for example.<br />(In fact, it depend on a variable compt of type int in a loop)<br />I can't do for jerome for example in the setValue : <br /><br />location : <br /><br />/process_data/FormB/object/data/xdp/datasets/data/FormulaireB/InfoFils[1]<br /><br />expression : <br /><br />the info of jerome<br /><br />because the formB is empty and InfoFils[1] doesn't exist.<br /><br />If I do : <br /><br />location : <br /><br />/process_data/FormB/object/data/xdp/datasets/data/FormulaireB<br /><br />and expression : <br /><br />/process_data/FormB/object/data/xdp/datasets/data/FormulaireB/InfoFils[1]<br /><br />It copy the node I want but delete all the other nodes under FormulaireB<br /><br />and if I do the same for linda for example : <br /><br />/process_data/FormB/object/data/xdp/datasets/data/FormulaireB/InfoFils[3]<br /> <br /><br />It will erase the Info of jerome.<br /><br />I don't know how do that. Need I use the xslt transformation ? Or create a component ? Can I use the DOM methodes to create nodes in the setValue ?<br /><br />Thanks for any advice