weaving rule context
Hi,
i want to generate 1 root-concept for each model and then use the weaving rule, to put subnodes in this context.
I tried to create the root-concept in the output-model using the "conditional root rules" or the "root mapping rules". Thats working.
But when i tried to create nodes in that using the weaving rule I get an error.
I tried genContext.outputModel.roots(TextSymbols).first
and i tried using using labels:
errormessage: bad context for weaving rule: map_TextSymbolsList is generated by 'create root' rule
What is wrong? How to do that?
i want to generate 1 root-concept for each model and then use the weaving rule, to put subnodes in this context.
I tried to create the root-concept in the output-model using the "conditional root rules" or the "root mapping rules". Thats working.
But when i tried to create nodes in that using the weaving rule I get an error.
I tried genContext.outputModel.roots(TextSymbols).first
and i tried using using labels:
errormessage: bad context for weaving rule: map_TextSymbolsList is generated by 'create root' rule
What is wrong? How to do that?
Please sign in to leave a comment.
There are two possibilities:
1. Turn off 'strict mode' (though we wouldn't recommend that). Outcome is slower generation of large models.
2. Do not use weavings. Collect required nodes and apply templates in the conditional root (or root mapping rule) template. It is much more straightforward (and clear).
(Weaving are still available between roots which are generated from the same input root)
So actually there's no situation where you really MUST use weaving rules?