Hi all, SMW just got one new and one old feature (coming with the next release candidate) which I think are worth pointing out:
(1) Type:Boolean works again. It mostly does what it did in SMW0.7: you enter
values by saying 1 or 0, or one of the true- or false-words defined for your
language. You can customise query printouts in various ways now (using #ask
syntax):
?boolproperty
default printout with main labels of the language
?boolproperty#true,false
use "true" and "false" as labels for the two values
?boolproperty#x
use 'X' for true and nothing for false, useful for making cross tables
(in <ask> syntax these would be [[boolproperty::*]],
[[boolproperty::*true,false]], and [[boolproperty::*x]])
BUT, before you start using Booleans all over your wiki, let me point out
another feature:
(2) "Boolean printouts" for categories are now possible. This is a kind of
printout statement for queries that will show you for each result whether or
not it belongs to a given category or not. Consider the following example
query:
{{#ask:[[Category:Event]] |
?title = Name|
?Category:Conference|
?Category:Workshop|
limit=50
}}
The query shows 50 elements of Category:Event with various printouts. The
important parts are the ones of the form "?Category:Conference". So far there
was only "?Property" (print all property values) and "?Category" (print *all*
categories). Now "?Category:Conference" checks whether a result is in
Category:Conference and returns a Boolean value based on this. The default
output style for this is "X" which is most easy to read in output tables, but
you can also customise it just like Type:Boolean (e.g. one could
write "?Category:Conference=is conference,no conference" to get those two
labels associated).
See http://ontoworld.org/wiki/Upcoming_events#List_of_upcoming_events for an
example printout of this kind.
Note that this feature does not work with the old <ask>-style syntax. #ask is
just better for such extensions (and for many other things).
So you can actually use normal categories instead of properties of
Type:Boolean in many cases. My suggestion is to do that, since categories
integrate better with the article layout, and since they are also used by
many other MW features and extensions (CategoryTree, SemanticDrilldown,
etc.). The cases where Type:Boolean properties are still useful are (a) when
you want to distinguish between "true", "false", and "unspecified"
(categories really only have "true" and "false-or-unspecified"), or when you
have so many property values on one page that categories would not be easy to
read or maintain anymore. But do as you like.
Cheers,
Markus
P.S. Printouts of the form "?property::value" with the obvious meaning are
also planned, but need some more internal changes to work.
--
Markus Krötzsch
Institut AIFB, Universät Karlsruhe (TH), 76128 Karlsruhe
phone +49 (0)721 608 7362 fax +49 (0)721 608 5998
[EMAIL PROTECTED] www http://korrekt.org
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ Semediawiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
