On 23.05.2012 13:14, Nikola Smolenski wrote:
> I see multiple possibilities:
> 
> {{#data:color|item=Blah}} - this uses item linked to "Blah" in the local 
> language.
> {{#data:color|item=en:Blah}} - this uses item linked to "Blah" in English 
> language.
> {{#data:color|id=q123}} - this uses item with ID q123.
> {{#data:Blah->color}} - we can do this since -> can't appear in a page name -
> this is my favorite of course :)

I agree that it would be nice to allow adressing by wiki-page as well as item id
would be nice. The exact syntax should be the same that we will also use for
interwiki links to the repository. It's still to be decided.

> Every template or article could read any item without the need to pass it.

This is really the major point... do we

1) want *pass* a data item to a template for formatting?

2) or do we want the template to control the loading of the data item?

I prefer 1), but many people appear to favor 2), and I am beginning to get the
impression that 2) is easier and cleaner to implement.

We could even do

3) no explicit reference/use of the item at all. Just use parser function to
access properties, and specify the item if need be (otherwise, the page's "own"
item is used).

> By the way, in some cases a single assertion might have multiple sources, 
> also a
> single source might support multiple assertions, this needs to be taken into
> account.

Yes, indeed.

>>> The parser function should be able to override itself by template 
>>> parameters - I
>>> believe it is possible to do this.
>>
>> That makes the hair in my neck stand up :)
> 
> From the user point of view or the implementation point of view? :)

Both. And as Gabriel pointed out, something like this would be really bad for
things like the visual editor, snippet caching, etc.

> The problem is that we are going to pre-load all the data of an item before 
> the
> article renders, right? So now we need to pre-load all the data in all the
> languages.

Well, at the moment, we would be loading the entire item, which includes all the
languages. If we don't do this, item-level caching is going to be a nightmare.

> If there will be no pre-loading, disregard this.

Don't know what you mean by "pre"... the item will be loaded into memory once,
whenever the page is rendered. It would typically be loaded from a local cache
(e.g. in the database), an http request to the repo while rendering would be
annoyingly slow.

>> Except that it's not wrapped in any HTML. Perhaps there should be an option 
>> to
>> {{#data-value}} to turn that off completely, using form=plain or some such.
> 
> Now shorten #data-value to #data, use form=plain as the default and that's it 
> :)

Yes, we can drop the "simple" parameter-like syntax an use parser functions for
everything.

The remaining question is... how do i specify the item i want to get the
property from (if it's not the default)? Will be be assigning local names to
items, using #load-data or some such? Or will we just use the item id directly -
which would probably be a parameter, so we'd end up with something like this:

  {{#property:population|item={{{item-id|*}}}}}

...with * representing the default (the page's "own") item. Not very pretty,
especially not if you have to do it for 20 or 50 properties. So perhaps this is
nicer:

  {{#load-data|thingy|item={{{item-id|*}}}}}
  ...
  {{#property:population|item=thingy}}

> I would try not to introduce new syntax if it is not necessary. How about 
> this:
> 
> [[wikidata:Berlin]] - links to en.wikidata.org/wiki/Berlin
> [[wikidataid:q1234]] - links to en.wikidata.org/id/q1234
> {{canonicalurl:wikidata:Berlin|action=edit}} - links to edit page
> 
> All of this syntax already exists, is widely used and could be introduced
> without additional coding :)

You'd have to do  [[wikidata:id/{{#property:id}}|the data item]].
That would be possible, i guess, and it would go to the correct table (iwlinks).

But this doesn't work for edit links. Especially not if the edit link is
supposed to invoke the on-site ajax editing interface.... How to you generate a
link/button for doing that?

-- daniel

-- 
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.

_______________________________________________
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l

Reply via email to