Mapping for root nodes
Hello,
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,
Georges
EDIT: Updated screenshot, it lacked the LangA model I used as an example
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,
Georges
EDIT: Updated screenshot, it lacked the LangA model I used as an example
Please sign in to leave a comment.

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.