It has been quiet around Mozilla XForms for a while now. But now Beta3 of Firefox 3.5 is out and it’s time to update the XForms plugin to get it released in time with the official Firefox release.
Mozilla switched from CVS to Mercurial (hg) with this release and removed the XForms extension from the core tree. We got a new hg repository, but it’s still empty (http://hg.mozilla.org/xforms). So what’s to do now?
- Convert the extensions/xforms directory from CVS to hg.
- Create a new hg repository on hg.mozilla.org for schema-validation and convert extensions/schema-validation to hg.
- Make the XForms extension build with Firefox 3.5 (there has been some cleanup work towards Mozilla2).
To get started, I did the CVS to hg conversion for XForms and schema-validatio n.The results are available at http://philipp.wagner.name/hg. I mainly followed Gijs instructions for converting Venkman, so that’s the short version of how I did it:
- Check out existing code from CVS
$> cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d xforms-cvs mozilla/extensions/xforms - Make sure your ~/.hgrc file contains the following lines:
[extensions]
hgext.convert=
mq =[convert]
hg.usebranchnames=0
hg.clonebranches=1 - Convert all branches
$> hg --encoding utf8 convert xforms-cvs xforms-hg-initial
This may take a while. - Remove the [convert] section from your ~/.hgrc file
- Create the authors.txt file with a mapping of CVS usernames to names and e-mail addresses.
For a list of authors use
cd xforms-hg-initial/default && hg log | grep "user:" | sort | uniq | cut -c14- > ../../authors.txt - Convert the default repository to the final XForms repository:
$> hg --encoding utf8 convert --authors authors-merged.txt xforms-hg-initial/default/ xforms-hg-final
I chose to “merge” authors, by mapping multiple e-mail addresses to one (the current one). For schema-validation I did exactly the same and the result is available in my hg repository.
The final step is go get it all compiling. Using hg annotate I found the relevant bug reports that changed things and I made the required changes to XForms, which resulted in the patch attached to bug #485734.
Now the XForms extension compiles and works as it did before on Firefox 3.5. What’s left is to get all those outstanding patches into the code. To check it out, use
$> hg clone http://hg.mozilla.org/releases/mozilla-1.9.1 mozilla-1.9.1
cd mozilla-1.9.1
$> hg clone http://philipp.wagner.name/hg/xforms extensions/xforms
$> hg clone http://philipp.wagner.name/hg/schema-validation extensions/schema-validation
Then building works as it did before.

2 responses so far ↓
1 Ludwig Jaffe // Oct 22, 2009 at 10:31
Are you getting much help with developing XForms for Firefox 3.5?
I’m using the add-on XForms 0.8.6.ff3. I am interested in learning about what needs to be done and lobbying Firefox to integrate this capability in a future release.
2 Philipp // Oct 22, 2009 at 14:58
As it turns out, XForms are too heavy for the average web developer, which means they probably will never be a core part of Firefox. This decision may change in the future of course. But I don’t have much of a problem with the add-on approach, either.
I also see that the benefit of a client-side solution is decreasing every day. With the advantage of AJAX technologies, XForms can be emulated pretty well in plain HTML and JavaScript, as it’s done in Orbeon Forms or Ubiquity. There are still some benefits of a client-side solution, but I don’t know how long these advantages will last. (they are mainly problems of the browser security model which does not allow some operations, e.g. a picture upload field and a xf:output displaying the picture right away from hard disk).
Regarding development, currently no company is supporting the development of Mozilla XForms any more and thus progress is really slow atm. Previously, Novell and IBM had some developers working on Mozilla XForms full time. Let’s see how this changes in the future.
Leave a Comment