Last modified: 2013-10-23 18:16:13 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'?
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