>Since the last posting about the adventure of modeling VEX with EMF, I’ve made some more progress. The VEX Model is now switched over to EMF and the code is working as well. All existing functionality is work. Here is the latest snapshot of the model.
I’ve added the ability to the model to handled Comment, Processing Instructions, Attributes (as classes), and namespaces for elements and attributes. One catch I ran into has been the synchronization between the WTP DOM and the EMF model. The WTP framework makes some assumptions on how the Model was created, in which don’t apply to the VEX Model. The VEX Model is designed to handle any type of XML, it’s more DOM like. The WTP Adapter framework for EMF2DOM makes an assumption that you generated the model from a Schema, and thus have Class names that correspond to elements or attributes of the same name in the EMF model. This doesn’t work for a generic DOM like model where you have a generic document class, that could hold any type of XML.
So after brainstorming with Ed Merks, the Godfather of EMF. He pointed me in the direction I’m heading now. Basically carry a copy of a W3C DOM for the corresponding element. I.e. if it’s an Element class in VEX, it’ll also carry a field that represents the correspond DOM item. It’s the way the XSD Model is done, and seems to be the simpliest way to go forward. It’s then a matter of using the various ways to notify the models about changes so they synchronize correctly. I suspect this will take a little while to work out, but at least gives me some renewed hope.
Unfortunately, I’m going to have to put VEX away for a bit, so I can revisit and give my other project some love. XSL Tools 1.0M3 will be out soon, and that leaves some pressing issues that need to be addressed for 1.0M4. In particular a really odd bug in which the XSLT comment() method is being ignored during a transformation run, but works perfectly fine when run via ANT. That should be a fun one to track down. XSL Tools 1.0M4 is tentatively themed for some more Debugging enhancements and fixes, so we’ll hopefully get some more interesting things coming out. The editor is pretty complete from an XSLT 1.0 side, so it’s time to concentrate a bit on the debugging framework.
More on VEX and XSL Tools as things progress.