Help:Result formats (deferred mode)

From semantic-mediawiki.org
Jump to: navigation, search
Result printer (deferred mode)
The @deferred query marker as identifier to delay query execution and result output generation
Image / Video collection
Keywords
Table of Contents

Semantic MediaWiki 3.0.0Released on an unknown date and compatible with MW 1.27.0 - 1.30.x. extends the #ask and #show parser functions used to generate Inline queries with the @deferred query marker1 as a fixed identifier to support the postponement of query execution and hereby defer (delay) the generation of query results for inline queries until after the page build process has been completed. The objective is to enable a result format to build outputs independent from the page flow and static HTML by creating a more responsive result output.

Features and limitations

The following result formats support the @deferred query marker (ResultPrinter::isDeferrable):

Result formats providing data exports (ResultPrinter::isExportFormat) do not support the @deferred query marker since they do not create an active repository connection during the page build process:
- result format "bibtex"Produces a link to a file for downloading data in BibTeX format.
- result format "csv"Outputs semantic data in Windows-style Comma Separated Value format
- result format "dsv"Outputs semantic data in UNIX-style Delimiter Separated Value format
- result format "excel"Outputs the result in Microsoft Office Excel file format (xls).
- result format "feed"Export results as RSS and Atom feed
- result format "json"Outputs semantic data in JSON format
- result format "kml"No description was provided.
- result format "rdf"Export result table as RDF
- result format "rss"No description was provided.
- result format "word"Outputs the result in Microsoft Office Word file format (doc/docx).
- result format "icalendar"No description was provided.
- result format "vcard"Exports data in vCard format.

The same applies to inline queries with the |limit=0 option.

Dynamic output control

A result output generated using the @deferred mode has a distinct control over its display characteristics (using the Ajax technique) and allows for its display to be independent from other article content.

To make us of the output control, @control query marker was added1 as an identifier to help with the generation of different control elements that are separate from a result printer (or format). By default, the identifier can be assigned a slider attribute to add a slider widget which can dynamically alter a query result by modifying the limit option.

Examples

Syntax
{{#ask:
 [[Category:Lorem ipsum]]
 |limit=3
 |@deferred 
}}
Links

See also

References

  1. a b  Semantic MediaWiki: GitHub pull request gh:smw:2398 (Add support for @deferred mode)