diff --git a/libs/data-mapper-v2/src/mapHandling/MapDefinitionDeserializer.ts b/libs/data-mapper-v2/src/mapHandling/MapDefinitionDeserializer.ts index b3b8fa7e488..c42061685b6 100644 --- a/libs/data-mapper-v2/src/mapHandling/MapDefinitionDeserializer.ts +++ b/libs/data-mapper-v2/src/mapHandling/MapDefinitionDeserializer.ts @@ -148,8 +148,9 @@ export class MapDefinitionDeserializer { srcNode = this.getSourceNodeWithBackout(key); } else { const lastLoop = this.getLowestLoop().key; - // danielle handle namespace here - srcNode = findNodeForKey(`${lastLoop}/${key}`, this._sourceSchema.schemaTreeRoot, false) as SchemaNodeExtended; + // Handle relative attribute paths like './@AttributeName' by stripping the './' prefix + const normalizedKey = key.startsWith('./@') ? key.substring(2) : key; + srcNode = findNodeForKey(`${lastLoop}/${normalizedKey}`, this._sourceSchema.schemaTreeRoot, false) as SchemaNodeExtended; } return srcNode; }; diff --git a/libs/data-mapper-v2/src/mapHandling/__test__/MapDefinitionDeserializer.spec.ts b/libs/data-mapper-v2/src/mapHandling/__test__/MapDefinitionDeserializer.spec.ts index 25b9597ad89..0139038bc10 100644 --- a/libs/data-mapper-v2/src/mapHandling/__test__/MapDefinitionDeserializer.spec.ts +++ b/libs/data-mapper-v2/src/mapHandling/__test__/MapDefinitionDeserializer.spec.ts @@ -1224,7 +1224,7 @@ describe('mapDefinitions/MapDefinitionDeserializer', () => { ); }); - it.skip('creates a looping connection w/ index variable, conditional, and relative attribute path', () => { + it('creates a looping connection w/ index variable, conditional, and relative attribute path', () => { simpleMap['ns0:Root'] = { LoopingWithIndex: { WeatherSummary: {