Page MenuHomePhabricator

Create a tag that excludes all annotations
Closed, DeclinedPublic

Description

Author: joaoolavo

Description:
The idea is to have a tag that will ignore every annotations of some text inside the tag.

I've two scenarios that explains the reason of such tag:

  1. I want to include a page into another, but I don't want to include also the annotations. One could use the <noinclude> tag, but it can get fiddly depending on the amount of annotations.
  1. A template t1 which is annotating the parameters
  2. A page p1 which uses the template (must get annotations from the template)
  3. A page p2 which includes p1 (must not have annotations from p1)

<noinclude> won't solve this because it would be used inside t1, but this way p1 won't be annotated.

Creating a new tag, say <ignoresemantics>, will solve this issue.

One decision to be taken is:

  • When there's an alternate text, what would be the behavior? Show the alternate text? For instance: "The population is <noinclude>[[Population::127|</noinclude>about 100-150<noinclude>]]</noinlude>" will result in "The population is about 100-150"

Version: unspecified
Severity: enhancement

Details

Reference
bz13570

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:01 PM
bzimport set Reference to bz13570.

info wrote:

Markus, I noticed the "magic" property assignments [[SMW::off] and [[SMW::on]] that smwfParsePropertiesCallback() recognizes that turn $smwgTempStoreAnnotations. These seem to do exactly what Mr. Olavo requires. Let me know if we should document these magic property assignments.

If you want to disable semantic annotations for a template or page you transclude, another way to do it is to use an inline query with format=embedded and just name the page you want to transclude.

The discussion is on the semediawiki-user thread "Importing a page ignoring the annotations".

Actually I consider SMW::on and SMW__off a hack, since they intorduce a state-full behaviour into page parsing, and this is rather unusual in MediaWiki. I would much prefer to have a better solution at some point, and thus I did not document it. But users may of course make use of these switches at their own risk. I will certainly not remove them without having some replacement, so putting the in a template that could later be updated would be okay.

But I would leave this hint on this page -- interested users will find it -- and not put it into the documentation.

Re-assign to extension developer for triage/comments.

Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.