New Datasources for XUL Templating
XUL, the XML-based UI language used in Mozilla products, has supported templating for a while now. Unfortunately, the only datasources you could use to drive the templates were RDF-based datasources. This has been a hurdle for some, including me, to really dive into XUL templates.
Recently, Neil Deakin landed support for generic XML datasources, so I no longer have an excuse to not use XUL templates. Here’s an example:
RDF way
// Use a predefined RDF datasource
XML way
// Use an inline XML datasource or a URL-based XML datasource
The results are the same: A list of elements are generated inside the . Here is some developer information on XML datasources. You can test the new XML datasources in the latest Firefox 3a6 / XULRunner 1.9a6 releases.
Also, be on the lookout for SQL-based XUL template datasources too!