Thursday, 17 April 2008

oXygen and NVDL with XForms - adding support for the class attribute

This may be useful to others too. I've been using oXygen to edit XForms for a while now and I've found the NVDL validation to be incredibly useful.

One of the things that was bugging me for a while was that the schema threw errors every time I used a class="{nameofyourclass}" attribute on any <xforms: ...> element.

As my XForms get bigger and more complex, it's become frustratingly difficult to see the 'serious' structural errors because of the number of errors that complained about me using class attributes. So with a slight schema modification, we can get NVDL to allow for the use of classes..

Edit the XForms-Schema.xsd in the frameworks\xforms folder of your Oxygen install and at around line 66 (for the schema that ships with Oxygen 8 and 9) you should see:



Below the line that says:


Add this:


Save and re-open Oxygen and your form. You'll need to have something like this at the top of your XForms document - where the NVDLSchema attribute will point to your install of oXygen:

No comments: