On Dienstag, 15. Januar 2008, S Page wrote:
> Markus Nitsche wrote:
> > in Version 1.0 of SMW, ask query results for a certain category do not
> > only contain the articles of this category but also its subcategories.
>
> You're right.  That seems new to me, I'll resurrect my 0.7 to see if
> it's a regression.
>
> This seems to contradict Markus Krötzsch's comments in
> http://ontoworld.org/wiki/SMW_unit_test:Test_relation2 that by default
> "only "content pages" (default: normal pages and image pages) are
> considered in queries".
>
> Maybe someone has altered $smwgQDefaultNamespaces on ontoworld.org?

This default restriction has been turned off according to earlier discussions 
on this mailing list. This is also documented in INSTALL->Notes on Upgrading. 
You can turn it back on globally via "$smwgQDefaultNamespaces = 
array(NS_MAIN, NS_IMAGE);" or manually add extra conditions to the query as 
shown in S' mail below. This is mainly a performance issue, since the default 
should not add extra complexity to query answering unless explicitly desired. 
In many cases, queries do not show categories anyway, since they include 
further more specific conditions -- it seems better to leave it to users to 
decide when to add the extra restriction. Also note that the default 
restrictions influence also the behaviour of all subqueries, even of 
expressions like "+" that would otherwise be really simple to compute.

Regards,

Markus

>
> Anyway, you can get the behavior you seek by explicitly mentioning the
> namespace you want.  In your case it's the main unnamed one, thus add
> [[:+]]:
> <ask>
>   [[:+]]
>   [[Category:City]]
>   [[Located in:=*]][[Location of:=*]]
> </ask>
>
> --
> =S
>
> -------------------------------------------------------------------------
> 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/marketplac
>e _______________________________________________
> Semediawiki-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel



-- 
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

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
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

Reply via email to