Différences entre les versions de « Issue/3387 »

De Semantic MediaWiki - Sandbox
(form)
(chg)
Ligne 40 : Ligne 40 :
  
 
=== correct separator ===
 
=== correct separator ===
 +
==== syntax with #ask without specifying a result format ====
 
<pre>
 
<pre>
{{#ask: [[Under Pressure]] |?Is performer |format=list |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}
+
{{#ask: [[Under Pressure]] |?Is performer |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}
 
</pre>
 
</pre>
{{#ask: [[Under Pressure]] |?Is performer |format=list |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}
+
; result
 +
{{#ask: [[Under Pressure]] |?Is performer |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}
 +
<pre>
 +
; syntax
 +
{{#ask:
 +
[[Category:Song]]
 +
[[Is performer::{{#ask: [[Under Pressure]] |?Is performer |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}]]
 +
|format=broadtable
 +
}}
 +
</pre>
 +
; result
 +
{{#ask:
 +
[[Category:Song]]
 +
[[Is performer::{{#ask: [[Under Pressure]] |?Is performer |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}]]
 +
|format=broadtable
 +
}}
  
 +
==== syntax with #show without specifying a result format ====
 +
<pre>
 +
{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}
 +
</pre>
 +
; result
 +
{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}
 
<pre>
 
<pre>
{{#show: Under Pressure |?Is performer |format=list |valuesep={{!!}} }}
+
; syntax
 +
{{#ask:
 +
[[Category:Song]]
 +
[[Is performer::{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}]]
 +
|format=broadtable
 +
}}
 
</pre>
 
</pre>
 +
; result
 +
{{#ask:
 +
[[Category:Song]]
 +
[[Is performer::{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}]]
 +
|format=broadtable
 +
}}
  
{{#show: Under Pressure |?Is performer |format=list |valuesep={{!!}} }}
 
 
{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}
 
  
  

Version du 2 septembre 2018 à 19:18

Hard coded property values

syntax
{{#ask:
 [[Category:Song]]
 [[Is performer::David Bowie||Queen]]
 |format=broadtable
}}
result
 
000003
000023
000078
000126

Queried property values

wrong separator

syntax
{{#show: Under Pressure |?Is performer }}
result

David Bowie

→ This does not work since the separator is "," while you need a "||" as separator. Thus you get nothing in return:
; syntax
{{#ask:
 [[Category:Song]]
 [[Is performer::{{#show: Under Pressure |?Is performer }}]]
 |format=broadtable
}}
result
 
000003
000023
000078
000126

<ul><li>La partie « |David Bowie » de la requête n’a pas été comprise. Les résultats peuvent être inattendus.</li> <!--br--><li>La partie « ]] » de la requête n’a pas été comprise. Les résultats peuvent être inattendus.</li></ul>

correct separator

syntax with #ask without specifying a result format

{{#ask: [[Under Pressure]] |?Is performer |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}
result

David Bowie

; syntax
{{#ask:
 [[Category:Song]]
 [[Is performer::{{#ask: [[Under Pressure]] |?Is performer |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}]]
 |format=broadtable
}}
result
 
000003
000023
000078
000126

syntax with #show without specifying a result format

{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}
result

David Bowie

; syntax
{{#ask:
 [[Category:Song]]
 [[Is performer::{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}]]
 |format=broadtable
}}
result
 
000003
000023
000078
000126

<ul><li>La partie « |David Bowie » de la requête n’a pas été comprise. Les résultats peuvent être inattendus.</li> <!--br--><li>La partie « ]] » de la requête n’a pas été comprise. Les résultats peuvent être inattendus.</li></ul>


{{#ask:
 [[Category:Song]]
 [[Is performer::{{#ask: [[Under Pressure]] |?Is performer |format=list |headers=hide |link=none |mainlabel=- |valuesep={{!!}} }}]]
 |format=broadtable
}}
 
000003
000023
000078
000126


{{#ask:
 [[Category:Song]]
 [[Is performer::{{#show: Under Pressure |?Is performer |valuesep={{!!}} }}]]
 |format=broadtable
}}
 
000003
000023
000078
000126

<ul><li>La partie « |David Bowie » de la requête n’a pas été comprise. Les résultats peuvent être inattendus.</li> <!--br--><li>La partie « ]] » de la requête n’a pas été comprise. Les résultats peuvent être inattendus.</li></ul>

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