Différences entre les versions de « Utilisateur:SMW user/Sandbox »

De Semantic MediaWiki - Sandbox
Ligne 1 : Ligne 1 :
 
{{#if:
 
{{#if:
 
{{#subobject:city1
 
| Has page = Athens
 
}}
 
 
{{#subobject:city2
 
| Has page = Bangalore
 
}}
 
 
{{#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:event01 | Has text=Event 01}}
 
{{#subobject:event01 | Has text=Event 01}}
Ligne 165 : Ligne 113 :
  
 
}}
 
}}
 +
== Description ==
 +
Setting subobjects <code>events01</code> to <code>events13</code> with the property '''Has text''' (in theory these subobjects would hold lots of information). Setting subobjects <code>timer01</code> to <code>timer95</code>, which sets the properties '''Has date''' in 15 minutes steps and '''Has page''' to one of the event subobjects. Alternatively formulated, one of the thirteen events takes place every 15 minutes.
 +
 +
== Property declaration ==
 +
<pre>{{#subobject:event01 | Has text=Event 01}}
 +
...
 +
{{#subobject:event13 | Has text=Event 13}}
 +
 +
{{#subobject:timer00 | Has date=2021-05-19T00:00 UTC | Has page=Utilisateur:SMW_user/Sandbox#event05}}
 +
...
 +
{{#subobject:timer95 | Has date=2021-05-19T23:45 UTC | Has page=Utilisateur:SMW_user/Sandbox#event09}}
 +
</pre>
 +
 +
== Query ==
 +
<pre>
 +
{{#ask:
 +
  [[-Has subobject::Utilisateur:SMW_user/Sandbox]]
 +
  [[Has date::>19 May 2020 00:00]]
 +
| ?Has page.Has text
 +
| sort = Has date
 +
| format = table
 +
}}
 +
</pre>
 +
{{#ask:
 +
  [[-Has subobject::Utilisateur:SMW_user/Sandbox]]
 +
  [[Has date::>19 May 2020 00:00]]
 +
| ?Has page.Has text
 +
| sort = Has date
 +
| format = table
 +
}}
 +
 +
;Individual ask
 +
<pre>
 +
{{#ask: [[Utilisateur:SMW user/Sandbox#timer09]] | ?Has page.Has text|format=table}}
 +
</pre>
 +
{{#ask: [[Utilisateur:SMW user/Sandbox#timer09]] | ?Has page.Has text|format=table}}
 +
 +
== Problem ==
 +
The printed property chain ''Has page.Has text'' in the query above does '''not''' display all values while the individual ask in fact does.

Version du 19 mai 2021 à 17:40

Description

Setting subobjects events01 to events13 with the property Has text (in theory these subobjects would hold lots of information). Setting subobjects timer01 to timer95, which sets the properties Has date in 15 minutes steps and Has page to one of the event subobjects. Alternatively formulated, one of the thirteen events takes place every 15 minutes.

Property declaration

{{#subobject:event01 | Has text=Event 01}}
...
{{#subobject:event13 | Has text=Event 13}}

{{#subobject:timer00 | Has date=2021-05-19T00:00 UTC | Has page=Utilisateur:SMW_user/Sandbox#event05}}
...
{{#subobject:timer95 | Has date=2021-05-19T23:45 UTC | Has page=Utilisateur:SMW_user/Sandbox#event09}}

Query

{{#ask:
  [[-Has subobject::Utilisateur:SMW_user/Sandbox]]
  [[Has date::>19 May 2020 00:00]]
| ?Has page.Has text
| sort = Has date
| format = table
}}


Individual ask
{{#ask: [[Utilisateur:SMW user/Sandbox#timer09]] | ?Has page.Has text|format=table}}


Problem

The printed property chain Has page.Has text in the query above does not display all values while the individual ask in fact does.

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.