Radu, many thanks for your reply.
... and thank you for acknowledging this task to be difficult. I feel better already, as I am struggling with it.
So you do suggest using Xcerxes' object model of the Schema document to determine the possible opertions on a node?
I went down this route using this schema library
https://xsom.dev.java.netwhich does seem to to do some of the work in abstracting grouping, global, local entity references for you by providing an abstract object model of the schema document.
Still deriving allowed operations does not seem to be trivial. I had exactly the problem you desribe, finding a schema entity object matching the node my cursor is at.
I do understand that oxygene is still able to do this? I am able to edit a document conforming an arbitrary XML schema and oxygene would support me in editing the document by guiding me which elements/attributes are allowed to be added/removed at my current cursor position?