Last modified: 2013-10-23 18:16:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53602, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51602 - Allow API to parse text properties
Allow API to parse text properties
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-18 13:10 UTC by Leonard Wallentin
Modified: 2013-10-23 18:16 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Leonard Wallentin 2013-07-18 13:10:21 UTC
When using SMW as a database for other sites, all output of Text type properties will normally need to be parsed, as users will expect their formatting to work everywhere. Would it not be nice if this could be done when fetching data, from the API? Maybe by adding an html-option like '|?My text property#html'?
Comment 1 MWJames 2013-10-23 18:16:13 UTC
I suspect with #html option you mean to have text content be re-parsed (wikitext -> html) and provided by the Api?

Generally, formatting of content is not the responsibility of the SMW Api (unless it is a DataValue/DataItem object), SMW Api provides data "as-is" from the Store, if additional formatting (parsing wikitext -> html) is necessary other means (using the official MW Api) should be used to achieve the expected result.

Parsing (wikitext -> html) is only part of the SMW presentation layer where the Api (as a database access layer) should not provide a short cut to emulate a feature that is not part of its responsibility (this is to avoid internal dependencies on functionality it has no direct influence and also has something to do with serialization/deserialization of data as an external exchange format [1], wikitext is the intended "raw" text where html is a temporary representation of a content that can be interpreted by a browser).

[1] http://en.wikipedia.org/wiki/Serialization

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links