[Project_owners] chrome:rdf problem

HJ bugus at universum.org
Sat Oct 30 00:11:38 EDT 2004


This fails to work:

var rv;
var rdfService = 
Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
var rdfDS = rdfService.GetDataSource("rdf:chrome");
var resSelf = rdfService.GetResource("urn:mozilla:package:multiviews");
var resDisabled = 
rdfService.GetResource("http://www.mozilla.org/rdf/chrome#disabled");
rv = rdfDS.GetTarget(resSelf, resDisabled, true);

Note that using any of these: baseURL, locType, name, displayName, 
author, authorURL, settingsURL, description, extension and skinVersion
works perfectly, but 'disabled' is only located in the profiles copy of 
chrome.rdf, so I guess that is why it fails. However, this displays the 
disable attribute:

<menupopup datasources="rdf:chrome" ref="urn:mozilla:package:root">
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome">
<rule chrome:extension="true">
<menuitem uri="..." label="rdf:http://www.mozilla.org/rdf/chrome#disabled"/>
</rule>
</template>
</menupopup>

Is there a work around for this problem?

TIA,
/HJ


More information about the Project_owners mailing list