From: LeeH <lee...@gm...> - 2010-11-07 08:49:44
|
Hi there, I'm hoping this is just a newbie question. SMW allows us to query for links through sub properties e.g. Has A subproperty of Has_Some_Parent_Property Has B subproperty of Has_Some_Parent_Property Has C subproperty of Has_Some_Parent_Property In my ask query i can: {{#ask: [[Has_Some_Parent_Property:: {{PAGENAME}} |?Has_Some_Parent_Property }} to ask if there are other pages in the wiki that have one of these links to my current page. This works really nicely, and i get the expected result, other pages that link back to PAGENAME through one of these 3 links. HOWEVER, what i dont get back is the actual property name (Has A/Has B/Has C). So, i can see the property value, but not exactly which property connected it. Is there some trick to getting not "Has_Some_Parent_Property" but which of Has A/Has B/Has C this is? The reason i want to do this is that i want to generate an ask query that simulates the "what links here" view i.e. I dont want to specify a specific property that connects things, but rather say "give me anything that links here, through any property". By making the properties that could provide the link, children of a parent, i can now query perfectly, but as i say just cant work out how to get the actual specific property that makes the link. Thanks! lee |
From: Juriy K. <kat...@gm...> - 2010-12-29 21:11:17
|
Hello! If I understand your question right, you want to use subquery that has a property list as a result. That is restricted see [1]. Yury [1] http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Subqueries_for_properties On Sun, Nov 7, 2010 at 11:49 AM, LeeH <lee...@gm...> wrote: > Hi there, I'm hoping this is just a newbie question. SMW allows us to query > for links through sub properties > e.g. > Has A subproperty of Has_Some_Parent_Property > Has B subproperty of Has_Some_Parent_Property > Has C subproperty of Has_Some_Parent_Property > > In my ask query i can: > {{#ask: [[Has_Some_Parent_Property:: {{PAGENAME}} > |?Has_Some_Parent_Property > }} > to ask if there are other pages in the wiki that have one of these links > to > my current page. This works really nicely, and i > get the expected result, other pages that link back to PAGENAME through one > of these 3 links. > > HOWEVER, what i dont get back is the actual property name (Has A/Has B/Has > C). So, i can see the property value, but > not exactly which property connected it. > > Is there some trick to getting not "Has_Some_Parent_Property" but which of > Has A/Has B/Has C this is? > > The reason i want to do this is that i want to generate an ask query that > simulates the "what links here" view i.e. I dont want to > specify a specific property that connects things, but rather say "give me > anything that links here, through any property". By > making the properties that could provide the link, children of a parent, i > can now query perfectly, but as i say just cant work out > how to get the actual specific property that makes the link. > > Thanks! > lee > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- Yury V. Katkov Laboratory of intelligent systems of the Saint-Petersburg National University of Information Technologies, Mechanics and Optics, Russia http://ailab.ifmo.ru |