XUL Talk:Templates Plan: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (Reverted edit of Z007, changed back to last version by Conor325)
(No difference)

Revision as of 08:54, 2 May 2005

Comments User:Conor325

Enhanced builder to support Fresnel and other Query Processors

Fresnel is SIMILE's RDF query mechanism. It builds on SPARQL or XPath and provides query modularization. To allow for a fully functional Fresnel Query Processor, the builder and result interfaces would have to be enhanced.

Fresnel supports "get-all" where you can get the values of all of the predicates of an object or all but a particular group. I imagine that most query mechanisms have this facility. Problem is that the XUL Builder doesn't support this. It needs explicit names for all the predicate values it receives. It can't just walk a result object using value="?*" of some such wildcard.

Fresnel supports label attachment for values so for example, if you get a value for the predicate "http:.../wife" of say "Mary", you can also attach the label "Wife" to Mary for the builder to use. By default that label can come from OWL. The result object (http://wiki.mozilla.org/XULTemplatesAPI#Result_Objects) passed from Query processor to Builder doesn't have a slot for "label". Unless it's added you would loose one of the nicest features of a Fresnel processor.

Add these two facilities and XUL templates become a lot more powerful.

RDF caching and refresh

Neil pointed out that RDF refresh was implemented last year and it can be called from remote code. However, RDF caching is still an issue. Refresh and caching is a general issue for all "file based" data sources i.e. where they is a load at startup and subsequent queries run off a local cache.

RDF templates and RDF loading

A big shortcoming of rdf templates now is that they seem to load data sources synchronously (Neil pointed out to me that this is just an impression - they actually load asynchronously but so fast that they block the browser anyway). A large file certainly blocks the browser. They seem to load the datasource as part of template parsing which doesn't allow a page to register as a builder listener and so catch when the first build of an element completes. As part of version 2, I think loading shouldn't block the browser (some timer stuff or what?) and there should be an event like "datasourceLoaded" to mark its end.

Problems with RDF query

  • can't extract a literal predicate's value directly from a scoped resource (must use blank nodes)