Developing an idea with RuleEngine in XData, we could even refuse from editing full class and edit only valuable xml. Sometime ago I have already written an article(in russian) about such possibility, even more, in that article I wrote about compilable JavaScript to Caché.