WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.
Example: Generate a listbox of items with multiple columns
This example shows how to create a listbox with mutliple columns. Each column displays the value for a different predicate. The columns are defined outside the template but will be added inside the listbox.
<listbox datasources="animals.rdf" ref="http://www.some-fictitious-zoo.com/mammals">
<listcols>
<listcol flex="1"/>
<listcol flex="1"/>
<listcol flex="1"/>
</listcols>
<template>
<listitem uri="rdf:*">
<listcell label="rdf:http://www.some-fictitious-zoo.com/rdf#name"/>
<listcell label="rdf:http://www.some-fictitious-zoo.com/rdf#species"/>
<listcell label="rdf:http://www.some-fictitious-zoo.com/rdf#specimens"/>
</listitem>
</template>
</listbox>
