| Author | 
		  Message
		 | 
		
		  | Neharika617 | 
		  
		    
			  
				 Posted: Tue Sep 06, 2005 6:26 am    Post subject: Mapping question | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 06 Sep 2005 Posts: 1
  
  | 
		  
		    
			  
				Hi
 
I have recently started using MQSI, so kindly forgive me if my questions are too silly.
 
I have my input XML as
 
<ccc>
 
<aa>123</aa>
 
<bb>234</bb>
 
<cc>234</cc>
 
</ccc>
 
and my outputXML as
 
<iii>
 
<xx>xyz="abc"</xx>
 
<yy>abc="123"</yy>
 
<zz>fgh="345"</zz>
 
</iii>
 
<iii>
 
<xx>xyz="wer"</xx>
 
<yy>abc="qty"</yy>
 
<zz>fgh="por"</zz>
 
</iii>
 
<iii>
 
<xx>xyz="cbs"</xx>
 
<yy>abc="lkj"</yy>
 
<zz>fgh="oiu"</zz>
 
</iii>
 
I have to map each of input elements to o/p ie<aa> in input to xyz in <xx> in output.
 
I did simple one-to-one mapping.But i had a doubt if that was the right way as the fileds are repeating in output.
 
Kindly let me know if I am correct. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Meetraj | 
		  
		    
			  
				 Posted: Tue Sep 06, 2005 9:24 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Novice
 
 Joined: 02 Jul 2005 Posts: 18 Location: India. 
  | 
		  
		    
			  
				Hi,
 
    I think it is enough to do one-one mapping,but take care to specify the maximum occurence of repertative tag(in u are case <XX>) as "-1" .So that the it can generate as many repetative tags as u specify. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sweety176 | 
		  
		    
			  
				 Posted: Tue Sep 06, 2005 10:20 am    Post subject: reverse | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 24 Aug 2005 Posts: 30
  
  | 
		  
		    
			  
				HI Meetraj
 
Actually i have the reverse structure
 
I mean input is repeating and o/p is single
 
will it still be the same
 
Regards | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Meetraj | 
		  
		    
			  
				 Posted: Tue Sep 06, 2005 10:36 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Novice
 
 Joined: 02 Jul 2005 Posts: 18 Location: India. 
  | 
		  
		    
			  
				Hi,
 
 
     Yes,i think within my knowledge it is same.But, pls look after u r msg definition file for the correct stucture on both sides. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sweety176 | 
		  
		    
			  
				 Posted: Tue Sep 06, 2005 11:04 am    Post subject: SOLVED | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 24 Aug 2005 Posts: 30
  
  | 
		  
		    
			  
				Hi Meetraj
 
Thanks for ur reply.
 
I solved it.Actually it had repeating fields in the output too.
 
SO i used the cardinality function and used a loop to count the number of instances and then map one-to-one.
 
Regards
 
Neharika | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |