On Tue, 19 Jan 2010 10:40:16 +0300, Dmitriy Sintsov wrote:
- Aryeh Gregor Simetrical+wikilist@gmail.com [Mon, 18 Jan 2010 17:36:23
-0500]:
What would be sample SMW markup for the image example from my first post here?
Something like this: [[Property_name::Property_value]] I think the "third" (actually the first) value in triple will be the page where the property is defined. Also, the output of property value can be piped very much similar to the links.
[[work::http://upload.wikimedia.org/...terrestrialglobe-1592-20061127.jpg]] [[title::Emery Molyneux Terrestrial Globe]] [[author::Bob Smith]] [[license::http://creativecommons.org/licenses/by-sa/3.0/us/]]
While the pages with corresponding property names (work, author etc..) in NS_PROPERTY namespace will define the semantic types of data.
Someone stated that square-bracket syntax is harder to parse, favoring magic words / functions. Perhaps such definitions can be replaced by semantical magic words {{PROP|Name|Value}}, implemented for the Parser. Then, SMW itself can pick up that curly-brace syntax. The advantage is, that dumps of Wikipedia will be suitable for local SMW querying, even if there will be no SMW installed at Wikiemdia servers.
IIRC, the main stumbling block for SMW is that it's too monolithic, so a project can't push to get the parts of it enabled that they need, since it's pretty much all or nothing. I think a syntax that's more consistent with the rest of MediaWiki would simplify that.
The most obvious way to do that, particularly if you only want to create metadata without rendering links, would be just to use the normal parser function syntax {{#function:name=value|...}} i.e.
{{#smw: work=http://upload.wikimedia.org/...terrestrialglobe-1592-20061127.jpg%7C title=Emery Molyneux Terrestrial Globe | author = Bob Smith | license=http://creativecommons.org/licenses/by-sa/3.0/us/ }}
If you do want to render links, maybe something akin to the current image linking syntax would be useful, so at least some parsing code could be shared; i.e.
[[smw:work|http://upload.wikimedia.org/...terrestrialglobe-1592-20061127.jpg]] written by [[smw:author|Bob Smith]]
I can see two major problems with using SMW syntax for input:
- Implementing microdata-output-as-microdata is trivial, and already
implemented in core. SMW syntax would still need to be implemented in core, and this would probably be nontrivial.
Just a minimal usable subset of syntax, without the semantic queries, "concepts" and other harder stuff.
- We typically set a much higher bar for new wikisyntax than for new
whitelisted HTML attributes. By our regular standards, I don't see how it would be justifiable to introduce new syntax for the sake of probably a tiny number of templates.
Semantic data is potentially everywhere in Wikipedia pages.
Maybe your syntax would be better here, but I don't really see the benefits except to those who are already using SMW.
MW Parser may introduce a better integrated syntax with magic words, which can be later adpated by SMW for it's extended querying abiilties. Just an idea. Dmitriy