Utilisateur:Carlo666/Test/Test5

De Semantic MediaWiki - Sandbox

Problem

This query return subpages of current page but also subobjects contained therein:

{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  |format=ul
}}

Trying to filter pages by '#' character

Trying to exclude pages with page name containing '#' produces no results:

{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[!~*#*]]
  |format=ul
}}


Trying to escape '#' does not filter anything:

{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[!~*\#*]]
  |format=ul
}}

Filtering by a substring of the subobject id works fine:

{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[!~*sub*]]
  |format=ul
}}


{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[!~*#sub*]]
  |format=ul
}}


{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[!~*\#sub*]]
  |format=ul
}}

Trying to filter subobjects by text properties

  • Excluding pages with property not containing '#' does not work:
{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[SomeTestProperty::!~*#*]]
  |?SomeTestProperty
}}
 SomeTestProperty
Carlo666/Test/Test5/Page1Carlo666/Test/Test5/Page1
Carlo666/Test/Test5/Page2Carlo666/Test/Test5/Page2
Carlo666/Test/Test5/Page2Carlo666/Test/Test5/Page2#sub1
  • Same results when '#' is escaped:
{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[SomeTestProperty::!~*\#*]]
  |?SomeTestProperty
}}
 SomeTestProperty
Carlo666/Test/Test5/Page1Carlo666/Test/Test5/Page1
Carlo666/Test/Test5/Page2Carlo666/Test/Test5/Page2
Carlo666/Test/Test5/Page2Carlo666/Test/Test5/Page2#sub1
  • Now select only pages with property containing '#':
{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[SomeTestProperty::~*#*]]
  |?SomeTestProperty
}}
 SomeTestProperty
Carlo666/Test/Test5/Page2Carlo666/Test/Test5/Page2#sub1
  • When '#' is escaped no result is returned:
{{#ask:
  [[~{{FULLPAGENAME}}/*]]
  [[SomeTestProperty::~*\#*]]
  |?SomeTestProperty
}}
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.