Hi I wonder if you could help yet again I am trying to write a spin:constructor that does the following
1)take the current instance ie. ?this ?this being <http://example.com/library/publishedBook/windInTheWillows#Paragraph_P20_para_4> 2) Get the namespace ie. http://example.com/library/publishedBook/windInTheWillows# 3) construct the following triple *?this model:source <http://example.com/library/publishedBook#windInTheWillows>* (ie. (not sure if this is the right terminolgy) go up a level from the instance and get the parent ontology <http://example.com/library/publishedBook> and create a subject ie *?this* a *predicate* of model:souce and an *object* that has a uri of <http://example.com/library/publishedBook#windInTheWillows> If I use the following select query , I get no problems SELECT * WHERE { BIND (afn:namespace(<http://example.com/library/publishedBook/windInTheWillows#Paragraph_P20_para_4>) AS ?nameSpace) . BIND (fn:substring(?nameSpace,1,42) AS ?subString). BIND (fn:substring(?nameSpace, 44) AS ?subString1) . ?localName spif:split ( ?subString1 "#" ) . BIND (?localName AS ?boundLocalName) . BIND (smf:buildURI("{?subString}#{?boundLocalName}") AS ?uri) . However if I use the following Construct query , I get inferences that are "Untyped Literal" CONSTRUCT { ?this coreModel:source ?uri . } WHERE { BIND (afn:namespace(?this) AS ?nameSpace) . BIND (fn:substring(?nameSpace,1,42) AS ?subString). BIND (fn:substring(?nameSpace, 44) AS ?subString1) . ?localName spif:split ( ?subString1 "#" ) . BIND (?localName AS ?boundLocalName) . BIND (smf:buildURI("{?subString}#{?boundLocalName}") AS ?uri) . } I think the problem lies in the spif:split function as I cannot seem to get this to work with a BIND , however much I try and work out the sytax I get the following error WARN [Thread-89] (E_Function.java:70) - URI <http://spinrdf.org/spif#split> has no registered function factory Please also bear in mind that I am not yet fully conversant of trully understand when BIND should be used. If there is a better way of taking an instance, getting its parent ontology from slash notation creating the triple I need then please correct my ignorence Regards again John -- -- 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 Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
