Relaying the conversation between gregor and me on
<https://meta.wikimedia.org/wiki/Talk:Wikidata/Notes/Inclusion_syntax#Various_notes>:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In general, I am surprised that on the one hand you seem to be deeply modifying
the template parameter calls (by providing structured parameters and methods to
resolve the structure) while at the other hand you don't allow the data items to
be called from within a template. You present approach seems to force either
each page that calls an infobox template to be modified (replacing the
{{infoboxZZZ |foo=some value}} with a {{#data-template:infoboxZZZ |foo=some
value }} call, or, which is more likely, each infoboxZZZ to be renamed to
infoboxZZZ-Inner and a new infoboxZZZ be created that calls the infoboxZZZ-Inner
wrapped in the #data-template.
While this is possible to do, it seems a some overhead in the (very likely)
scenario that an infobox display a mixture of wikidata-stored information and
page-injected information, i.e. both the wrapper, and the inner, real infobox
template need to pass the right parameters.
I guess that approach is taken because of caching concerns. However, given that
the template parameter calls have to be overloaded for wikidata anyways: is it
possible to silently, whenever calling a item.color as a parameter, to always
cache the entire item, so that the next call for item.size would already be in
memory?
Some random notes on the text, which may or may not be useful:
The explanation is somewhat hard to follow, because the section "Including
Items in an Article" requires an understanding of what the object is that is
passed to a template. Normally templates do not get structured parameters
passed, so this was surprising to me. You invent this newly and a new syntax.
Perhaps the explanation of this general mechanism could come first.
Like other commentators, I am sceptical about using the dot for this. Both
dots and hyphens are legal in the grammar for RDF property names
(
http://www.w3.org/TR/REC-xml/#NT-Name). Slashes or hashes are not and would be
a better choice in my opinion.
"This implies that the client wiki tracks": please define "client
wiki".
Also I cannot follow the rest of the sentence, perhaps elaborate.
--G.Hagedorn (talk) 21:15, 22 May 2012 (UTC)
It was indeed intentional to always do item formatting via a template, since
that seems to be the way people usually handle the formatting of uniform data
objects. This can easily be amended by introducing a parser function that makes
a data object available in the present scope, instead of passing it to a
template. As to forcing all pages using the infobox templates to be modified:
technically, you don't have to do that, because you can easily wrap the call to
#data-template in the original template and use some other template to do the
actual formatting. But in practice, the page will have to be edited anyway. It's
pointless to use data from Wikidata if we don't remove all the infobox
parameters from the article pages.
re caching: all data items are cached. Twice, actually: once persistently in
a local database table, and once per request, in memory.
re your text notes: thanks for the input, I'll improve that. I think I'm
going to rewrite the entire proposal, now that I have gotten some feedback. --
Duesentrieb (talk) 15:55, 23 May 2012 (UTC)
--
Daniel Kinzler, Softwarearchitekt
Wikimedia Deutschland e.V. | Eisenacher Straße 2 | 10777 Berlin
http://wikimedia.de | Tel. (030) 219 158 260
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt
für Körperschaften I Berlin, Steuernummer 27/681/51985.