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:

Saturday 12 April 2008

Validating XForms Syntax with oXygen and NVDL

Adding this line:



To the top of your Xforms will cause the form to be validated using the standard oXygen NVDL schema - this aids the process of authoring valid XForms code by offering XForms-aware syntax highlighting and error checking. I have found this to be really useful, so I hope it helps others.

Note:
file:/C:/Program%20Files/Oxygen%20XML%20Editor%209/

This is the path for a default install of oXygen 9.1 for windows (C:\Program Files\Oxygen XML Editor 9\)

Using Orbeon with a "plain" theme

I've just noticed that you can load any orbeon forms with the following parameter:

?orbeon-theme=plain

To load the page without the Orbeon banner and navigation.

You can also make modifications to epilogue-servlet.xpl to create a case for specific pages. For example, I've created a page called xforms-submit and I want to load that page using the plain theme (theme-plain.xsl). Editing /config/epilogue-servlet.xpl (on line 56 in v 3.6.0) and adding this rule:



Achieves the desired effect.

So after adding this, my line looks like this: