Subject:XML to XML Transformation Author:Bob Whitty Date:29 Apr 2010 11:28 AM
Hi Folks -
I'm converting an inbound XML document into a resulting XML document I can use to import into SQL Server 2005. I'm attempting to output the Carrier element in the transformation under a different element name (OtherPartner) with a PartnerRole attribute = 'Carrier'. Thus far all my attempts have failed and the Carrier element seems to be ignored. I'm wondering if someone could tell me what it is I'm doing wrong.
Inbound document fragment:
(FromID & DocID are global variables)
Subject:XML to XML Transformation Author:(Deleted User) Date:30 Apr 2010 12:45 PM
Hi Bob,
you shouldn't use the "self" axis when testing for Carrier, as the context node is the one specified in the match expression of the template. You should use either child::Carrier or just "./Carrier" like you do in the next lines.
Subject:XML to XML Transformation Author:Bob Whitty Date:01 May 2010 12:23 PM
Thanks Alberto!
I really appreciate you taking the time to give it a look and respond. I'll give it a go and I'm sure it will work out fine - this old dog is still trying to learn some new tricks!