Missing link between IField and widgets for Dexterity

Inside XML Director I have a special Dexterity field XML (derived from zope.schema.Text) that is used to store XML content:


However this XML field now requires a special rendering for display/input mode aka it needs a custom widget.

In example code (e.g. collective.datagridfield) I found these definitions using z3c.widgetTemplate


It is not clear how to link a particular field implementing IField with a custom widget class.
What is the canonical approach here? Any reasonable example code?


Stupid me...I solved the problem for a different field in XML Director already a year ago inside the same configure.zcml :stuck_out_tongue: