XUL Talk:Templates Plan: Difference between revisions

Line 22: Line 22:
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.
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 ====
==== Problems/bugs current template mechanism ====
* can't extract a literal predicate's value directly from a scoped resource (must use blank nodes)
===== literal display =====
the current template mechanism doesn't display a literal predicate's value if  you are quering a particular resource (you must embed literals in blank nodes). [http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050419 SPARQL] for one let's you grab such a literal. For example,
              SELECT ?name WHERE { :people/p1 foaf:name ?name }
gets the name (literal) of a particular resource (the person ":people/p1"). If the problem in the current system is in the builder then it needs to be fixed.
40

edits