Part II of the seriesdiving into Mozilla.
Simple XUL example
Step1 – Download and Install jslib
and install it in your mozilla (it is a XPI, so no problem there)
Test the library by opening this url: chrome://jslib/content/
see also installation doc.
Step2 – write a XUL file to test
I did it with this ugly file that extracts the firstname from my public FOAF file: rdflib_hello (xul, 1 KB).
Step3 – configure it to run
The problem is that the XUL file must be placed where XUL files are usually placed. If you know how to do this, fine. If you don’t, you have to configure jslib so that it accepts files outside the chrome. This may be a security risk. Description to use jslib from local XUL files.
Step4 – run rdflib_hello.xul
Start Mozilla, go to “open file” and open the XUL file (or use chrome:// if you managed to put it in your chrome).
You should see a single button. Press it and the String “Leo” should come.
What it does:
You can also use the XPCOM RDF objects directly. So, at first glance Mozilla proves to be RDF-capable.