Template:Pipe Trick
This template creates a link from text and acts like the pipe trick in ordinary links. For example, [[Some Feat (3.5e Feat)|]] will be turned into [[Some Feat (3.5e Feat)|Some Feat]] when the page is saved.
This template emulates that, for the purposes of DPL and ask queries. It will remove parenthesis at the end of a link, as well as namespaces at the front of a link. To use this template, just do {{Pipe Trick|Page (text)}}, and make sure that the template argument is not itself a link. The template will resolve to [[Page (text)|Page]].
This provides a workaround for how Semantic MediaWiki, when outputting links, will always output the suffix our wiki adds like (3.5e Class). Usually when displaying links, you don't want that -- so you can use this template to get around it. Your queries should include the template parameter, and use this template, along with "link=none". For example, for a comma-separated list of links without the suffix, you'd write:
{{#ask: [[Category:3.5e]] [[Category:Class]] [[Category:Base Class]] |format=list |template=Pipe Trick |link=none }}
Note that this will just remove the portion of the page title in parentheses, and will otherwise output full subpage names.