Hello everyone

I am a beginner with SPARQL and SPIN and am currently trying to build my 
first ontology. I was able to figure out all problems with the help of 
online research, but don't know how to fix my current one:

I want to iterate through various sub-concepts with 1 to 6 instances each. 
While iterating I want to add up the instance values and bind them to 
(another concept's) instance's final value. The following code specifying a 
sub-concept with 3 instances works smoothly. 

*CONSTRUCT* {

    ?A ns:HasFinalScore ?FS .

}

*WHERE* {

    ns:1 ns:InstancePredicts ?A ;

    ns:InstanceHasInstanceScore ?IS1 .

    ns:2 ns:InstancePredictsRiskFactor ?A ;

    ns:InstanceHasInstanceScore ?IS2 .

    ns:3 ns:InstancePredictsRiskFactor ?A ;

    ns:InstanceHasInstanceScore ?IS3 .

    *BIND* (((?IS1 + ?IS2) + ?IS3) *AS* ?FS) .

}


When I try to run a template on the cub-concept that has those three 
instances (as indicated with the following code), it won't work anymore. 


*CONSTRUCT* {

    ?A ns:HasFinalScore ?FS .

}

*WHERE* {

    *?this* ns:KRIPredictsRiskFactor ?A .

    *?this* ns:InstanceHasInstanceScore ?IS .

    ?A ns:HasFinalScore ?FSold .

    *BIND* ((?FSold + ?IS) *AS* ?FS) .

}



Can you guys please help me figure out what the problem is?

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to