Handling Elements and Attributes in XSLT

Spaniaunrebra

New Member
Ok so I have gone through many related posts but have not been able to pinpoint an answer to my problem. I need to write an XSLT to transform an XML in the following format\[code\]<Message> <Receiver> <name>123</name> <address>111</address> <phone>1000</phone> </Receiver> <List> <item> <no>1</no> <desc>one</desc> </item> <item> <no>2</no> <desc>two</desc> </item> </List><Message>\[/code\]to this - \[code\]<Message> <Receiver name=123> <address>111</address> <phone>1000</phone> </Receiver> <List> <item no=1> <desc>one</desc> </item> <item no=2> <desc>two</desc> </item> </List></Message>\[/code\]I have tried using the xsl template match tag. but has failed miserably. Any ideas or help is much appreciated/ **note i have edited the post to show the actual problem - i initially posted just a part as to avoid confusion but as it seems the problem needs to be stated as a whole. Apologies for inconveniences.
 
Back
Top