Mapping for root nodes


As can be seen in the screenshot below, I get an "Unresolved Reference" when using a reference macro to a root node (as part of a Generator from LangA to LangB).

I have tried setting the red "<no TargetPerson>" in map_Guy to a reference to map_Guy, and also tried putting the "Guys to Persons" mapping in the "$LOOP"'s inspector field "mapping label", as well as doing both at the same time, but I always get the same result (the only change being the red "?TargetPerson?" changing into a red "map_Guy", but it's always marked as an "Unresolved Reference".

What am I missing here? How do I correctly transform my reference to a root node in LangA (ReferenceGuy) into a reference to the transformed target node in LangB (ReferencePerson which TargetPerson is the transform of the TargetGuy)?


I have searched the web without success, I feel like I should add the main "root mapping rules" to the corresponding mapping, but I can't find how to achieve that.

Thank you,

EDIT: Updated screenshot, it lacked the LangA model I used as an example
You are not storing the generated Persons in the mapping label, so they cannot be retrieved in the reference macro.
Just wrap the whole Person node in the root template with a LABEL node macro and specify the "Guy s to Persons" mapping label for it.
Thank you, that's exactly what I was looking for :) . I thought I would find it in the person node's inspector or the inspector for the root template itself, but hadn't realized I had to use $MAP_SRC$.

Please sign in to leave a comment.