content not generated from template
Brian Frein <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
hi,
I would appreciate some help. I have the following xul:
------------- begin xul ---------------
<xul:hbox id="element" datasources="rdf:null" style="border: 1px solid"
flex="1">
<xul:template>
<xul:rule>
<xul:conditions>
<xul:content uri="?uri"/>
<xul:triple subject="?uri"
predicate="http://www.foo.com/resources#property" object="?property"/>
</xul:conditions>
<xul:action>
<xul:textbox uri="?uri" value="?property"/>
</xul:action>
</xul:rule>
</xul:template>
</xul:hbox>
<xul:button label="click" onclick="init()"/>
----------- end xul ----------------
simple, isn't it?
and the "init" function is as follows:
--- begin init ---
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var element = document.getElementById('element');
var ref = "http://www.foo.com/resources#Node";
var ds = ... // mozilla in-memory datasource
element.database.AddDataSource(ds);
element.setAttribute("ref",reference);
--- end init ---
the DataSource "ds" only contains a element with an about equals to
"ref" with a predicate "http://www.foo.com/resources#property" equals to
"some value"
it looks trivial, but when I execute the init function mozilla 1.7.5
crashes. Any body could help me?
tx a lot!