Accessing a property of the outer loop's node in an inner loop

Hello,

I want to access one of the properties of a node that is inside of the outer loop from the inner loop.

To make it more clear here is an example what I want to do:

example.png


I have a outer loop for generating multiple classes from a concept (let's call it ChildConcept1 which is a child of ParentConcept). Loop becomes:

genContext, node, operationContext)->sequence<node<>> { 
  node.childConcept1; 
}
prettyPrint();

And I want to have an inner loop from another child concept of the ParentConcept (call it ChildConcept2). Inner loop will be:

genContext, node, operationContext)->sequence<node<>> { 
  node.ancestor<ParentConcept>.childConcept2; 
}
prettyPrint();

Inside the inner loop I want to check wheter childConcept1 property is equal to childConcept2 property.

How can I access the outer loop and get the childConcept1's property?

Best Regards,
Özlem
1 comment
You can use a $VAR$ property macro in the outer loop to store the node in de genContext
0

Please sign in to leave a comment.