My existing map, transforms a person from the source schema to a person from the destination schema using the functoids within the map based on type and a number of other logica. With a recent change from the destination schema I need to amend the transformation to use a key (guid) node so that we can group the data.
I would like to implement an inline XSLT script to for something like //Person*/[Key=same] but not sure on the XSLT for this.
Example input:
<Person>
<PersonType>PartnerParentsFarther</PersonType>
<Name>
<title>MR</title>
<Gender>MALE</Gender>
...
</Name>
<Address/>
<PersonKey>
<Key>a1093c4a-7c53-4de5-ad30-cb4140aec58</Key>
<ParentKey/>
</PersonKey>
</Person>
<Person>
<PersonType>PartnerParentsMother</PersonType>
<Name>
<title>MRS</title>
<Gender>FEMALE</Gender>
...
</Name>
<Address/>
<PersonKey>
<Key>a1093c4a-7c53-4de5-ad30-cb4140aec58</Key>
<ParentKey/>
</PersonKey>
</Person>
<Person>
<PersonType>PartnerParentsFarther</PersonType>
<Name>
<title>MR</title>
<Gender>MALE</Gender>
...
</Name>
<Address/>
<PersonKey>
<Key>a1093c4a-7c53-4de5-ad30-cb4140aec59</Key>
<ParentKey/>
</PersonKey>
</Person>
<Person>
<PersonType>PartnerParentsMother</PersonType>
<Name>
<title>MRS</title>
<Gender>FEMALE</Gender>
...
</Name>
<Address/>
<PersonKey>
<Key>a1093c4a-7c53-4de5-ad30-cb4140aec59</Key>
<ParentKey/>
</PersonKey>
</Person>
Example output currently:
<PartnerParents>
<Father>
<Title>MR</Title>
<Gender>MALE</Gender>
</Father>
<Father>
<Title>MR</Title>
<Gender>MALE</Gender>
</Father>
<Mother>
<Title>MRS</Title>
<Gender>FEMALE</Gender>
</Mother>
<Mother>
<Title>MRS</Title>
<Gender>FEMALE</Gender>
</Mother>
</PartnerParents>
Example required output, based on same key values:
<PartnerParents>
<Father>
<Title>MR</Title>
<Gender>MALE</Gender>
</Father>
<Mother>
<Title>MRS</Title>
<Gender>FEMALE</Gender>
</Mother>
</PartnerParents>
<PartnerParents>
<Father>
<Title>MR</Title>
<Gender>MALE</Gender>
</Father>
<Mother>
<Title>MRS</Title>
<Gender>FEMALE</Gender>
</Mother>
</PartnerParents>