RDF Tree problem
"sneakypete" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
Hi,
I'm having a problem building a tree from an RDF datasource. The
following XUL creates both a tree and a listbox with the same local
datasource. The listbox works fine, but the tree appears with the
second column the same as the first - and if I add more columns, they
all appear the same as the first.
Now I'm sure I had this working a while ago, but I just can't find
anything wrong with it. Any ideas?
If you want to try the full extension, it's at
http://peteburgers.fastmail.fm/rdf/rdftest.xpi
Thanks
Pete
XUL))))))))))))))))))))))))))))))))))))))))))))))))
<?xml version="1.0"?>
<window
id="RDFTest-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox flex="1">
<!-- Listbox: works fine (rows are: a 1, b 2, c 3)-->
<listbox id="UpdateList" flex="1"
datasources="file:///c|/updatescan.rdf"
ref="http://www.updatescan.com/rdf/updatescan/all">
<listcols>
<listcol flex="1"/>
<listcol flex="1"/>
</listcols>
<listhead>
<listheader label="letters"/>
<listheader label="numbers"/>
</listhead>
<template>
<listitem uri="rdf:*">
<listcell
label="rdf:http://www.updatescan.com/rdf/updatescan#letters"/>
<listcell
label="rdf:http://www.updatescan.com/rdf/updatescan#numbers"/>
</listitem>
</template>
</listbox>
<!-- Tree: second column is same as first column (rows are: a a, b b, c
c)-->
<tree id="UpdateList2" flex="1"
datasources="file:///c|/updatescan.rdf"
ref="http://www.updatescan.com/rdf/updatescan/all">
<treecols>
<treecol label="letters" flex="1"/>
<treecol label="numbers" flex="1"/>
</treecols>
<template>
<treechildren>
<treeitem uri="rdf:*">
<treerow>
<treecell
label="rdf:http://www.updatescan.com/rdf/updatescan#letters"/>
<treecell
label="rdf:http://www.updatescan.com/rdf/updatescan#numbers"/>
</treerow>
</treeitem>
</treechildren>
</template>
</tree>
</vbox>
</window>
RDF))))))))))))))))))))))))))))))))))))))))))))))))
<?xml version="1.0"?>
<RDF:RDF xmlns:NS2="http://www.updatescan.com/rdf/updatescan#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Seq RDF:about="http://www.updatescan.com/rdf/updatescan/all">
<RDF:li RDF:resource="http://test.com/1"/>
<RDF:li RDF:resource="http://test.com/2"/>
<RDF:li RDF:resource="http://test.com/3"/>
</RDF:Seq>
<RDF:Description RDF:about="http://test.com/1"
NS2:letters="a"
NS2:numbers="1"
/>
<RDF:Description RDF:about="http://test.com/2"
NS2:letters="b"
NS2:numbers="2"
/>
<RDF:Description RDF:about="http://test.com/3"
NS2:letters="c"
NS2:numbers="3"
/>
</RDF:RDF>