|
|
(5 versions intermédiaires par le même utilisateur non affichées) |
Ligne 1 : |
Ligne 1 : |
| {{#if:
| | ;Observation |
| | | * [[mw:Extension:MultimediaViewer]] works with one query with "format=gallery" and an additional image call. |
| {{#subobject:city1
| | <pre>{{#ask: [[Has image::+]] | ?Has image | imageproperty=Has image | format=gallery }}</pre> |
| | Has page = Athens
| | {{#ask: [[Has image::+]] | ?Has image | imageproperty=Has image | format=gallery }} |
| }}
| | * Additional file call |
| | | :[[File:Blue Marker.png]] |
| {{#subobject:city2
| | ;See also |
| | Has page = Bangalore
| | * [[Utilisateur:SMW user/Sandbox|Sandbox]] - only one query with "format=gallery", MultimediaViewer does '''not''' work |
| }}
| |
| | |
| {{#subobject:city3
| |
| | Has page = Beijing
| |
| }}
| |
| | |
| {{#subobject:city4
| |
| | Has page = Berlin
| |
| }}
| |
| | |
| {{#subobject:city5
| |
| | Has page = Gdańsk
| |
| }}
| |
| | |
| {{#subobject:city6
| |
| | Has page = Katowice
| |
| }}
| |
| | |
| {{#subobject:city7
| |
| | Has page = Kraków
| |
| }}
| |
| | |
| {{#subobject:city8
| |
| | Has page = London
| |
| }}
| |
| | |
| {{#subobject:city9
| |
| | Has page = Lublin
| |
| }}
| |
| | |
| {{#subobject:city10
| |
| | Has page = Sacramento (CA)
| |
| }}
| |
| | |
| {{#subobject:city11
| |
| | Has page = Shanghai
| |
| }}
| |
| | |
| {{#subobject:city12
| |
| | Has page = Warszawa
| |
| }}
| |
| | |
| {{#subobject:city13
| |
| | Has page = Wrocław
| |
| }}
| |
| | |
| | |
| {{#subobject:city101
| |
| | Has page = Athens
| |
| }}
| |
| | |
| {{#subobject:city102
| |
| | Has page = Bangalore
| |
| }}
| |
| | |
| {{#subobject:city103
| |
| | Has page = Beijing
| |
| }}
| |
| | |
| {{#subobject:city104
| |
| | Has page = Berlin
| |
| }}
| |
| | |
| {{#subobject:city105
| |
| | Has page = Gdańsk
| |
| }}
| |
| | |
| {{#subobject:city106
| |
| | Has page = Katowice
| |
| }}
| |
| | |
| {{#subobject:city107
| |
| | Has page = Kraków
| |
| }}
| |
| | |
| {{#subobject:city108
| |
| | Has page = London
| |
| }}
| |
| | |
| {{#subobject:city109
| |
| | Has page = Lublin
| |
| }}
| |
| | |
| {{#subobject:city110
| |
| | Has page = Sacramento (CA)
| |
| }}
| |
| | |
| {{#subobject:city111
| |
| | Has page = Shanghai
| |
| }}
| |
| | |
| {{#subobject:city112
| |
| | Has page = Warszawa
| |
| }}
| |
| | |
| {{#subobject:city113
| |
| | Has page = Wrocław
| |
| }}
| |
| | |
| }}
| |
| == Reference ==
| |
| Possible reference with issue [https://sandbox.semantic-mediawiki.org/wiki/Issue/4965 4988].
| |
| | |
| == Description ==
| |
| Setting subobjects <code>cityN</code> with the property '''Has page'''.
| |
| | |
| == Property declaration ==
| |
| <pre>{{#subobject:city1
| |
| | Has page = Athens
| |
| }}
| |
| ...
| |
| {{#subobject:city101
| |
| | Has page = Athens
| |
| }}
| |
| ...
| |
| </pre>
| |
| | |
| == Query ==
| |
| === Query 1 ===
| |
| <pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in}}
| |
| </pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in}}
| |
| Here no sort is used, i.e. the results are sorted by their subobject name. The problem is that some of the property chain values are '''not''' displayed at all.
| |
| <pre> | |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]] [[Has page::Athens]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in}} | |
| </pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]] [[Has page::Athens]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in}}
| |
| Querying for the city directly it shows all property chain values.
| |
| | |
| ==== Debug ==== | |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|format=debug}}
| |
| | |
| === Query 2 ===
| |
| <pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page}}
| |
| </pre> | |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page}} | |
| Here <code>sort=Has page</code> is used, in contradiction to the previous query, all property values are displayed.
| |
| ==== Debug ====
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page|format=debug}}
| |
| | |
| === Query 3 ===
| |
| <pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page|order=rand}}
| |
| </pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page|order=rand}}
| |
| Here <code>sort=Has page</code> and <code>order = rand</code> is used, again, some property values are missing.
| |
| ==== Debug ====
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page|format=debug}}
| |
| | |
| === Query 4 ===
| |
| <pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|sort=Has page.Located in}}
| |
| </pre>
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page.Located in}}
| |
| Offtopic, here trying to use <code>sort=Has page.Located in</code>. While the property chain values are displayed correctly, the sorting doesn't work at all. Something else takes precedence, ruining the intended sort, turning it internally into <code>sort=<!-- subobject name -->,Has page.Located in</code>, <code>sort=Has page,Has page.Located in</code> or <code>sort=Has page</code>. Not sure about this, but something is fishy here. I know that up to SMW 3.1.6 the sort <code>sort = <property1>.<property2>,<property></code> is turned internally into <code>sort = <property>,<property1>.<property2></code>, ordering the property chains by length first; but here that it somehow ignores the second property chain part is very wierd.
| |
| ==== Debug ====
| |
| {{#ask: [[-Has subobject::Utilisateur:SMW user/Sandbox2]]|?Has page|?Has page.Has area|?Has page.Has population|?Has page.Located in|sort=Has page.Located in|format=debug}}
| |