« Car12 » : différence entre les versions
De Semantic MediaWiki - Sandbox
Aucun résumé des modifications Balise : Éditeur de wikicode 2017 |
Aucun résumé des modifications Balise : Éditeur de wikicode 2017 |
||
(5 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 4 : | Ligne 4 : | ||
|?type of gear is | |?type of gear is | ||
|?number of wheels is | |?number of wheels is | ||
}} | |||
I would like to have the following result: | |||
{| class="wikitable" | |||
|+ | |||
!Cars | |||
!Manual | |||
!Automatic | |||
!3 wheels | |||
!4 wheels | |||
|- | |||
|Car1 | |||
| | |||
|X | |||
|X | |||
| | |||
|- | |||
|Car2 | |||
|X | |||
| | |||
| | |||
|X | |||
|} | |||
However unfortunately I am able to get automatically only the following | |||
{{#ask: | |||
[[Catégorie:Car]] | |||
|?type of gear is=Manual | |||
|?type of gear is=Automatic | |||
|?number of wheels is=3 wheels | |||
|?number of wheels is=4 wheels | |||
}} | |||
the solution requires a different modelling: each property value needs to be stored in the | |||
pages and then the ask has to include a column per each property value. | |||
{{#ask: | |||
[[Catégorie:Car]] | |||
|?has manual gear | |||
|?has automatic gear | |||
|?has 3 wheels | |||
|?has 4 wheels | |||
|?is electric | |||
|?is diesel | |||
}} | }} |
Dernière version du 11 février 2021 à 12:29
Here are listed all the cars that we have
Type of gear is | Number of wheels is | |
---|---|---|
Car1 | Automatic | 3 |
Car2 | Manual | 4 |
I would like to have the following result:
Cars | Manual | Automatic | 3 wheels | 4 wheels |
---|---|---|---|---|
Car1 | X | X | ||
Car2 | X | X |
However unfortunately I am able to get automatically only the following
Manual | Automatic | 3 wheels | 4 wheels | |
---|---|---|---|---|
Car1 | Automatic | Automatic | 3 | 3 |
Car2 | Manual | Manual | 4 | 4 |
the solution requires a different modelling: each property value needs to be stored in the
pages and then the ask has to include a column per each property value.
Has manual gear | Has automatic gear | Has 3 wheels | Has 4 wheels | Is electric | Is diesel | |
---|---|---|---|---|---|---|
Car1 | Y | Y | Y | |||
Car2 | Y | Y | Y |