Scott, >I wonder if what you really > want is to compare the user input directly in a FILTER, i.e.: > FILTER regex(?ext = "rdf")
After the additional input of Holger I understand now your suggestion. Indeed this is what I was after. Paul On Jun 17, 4:59 pm, Scott Henninger <[email protected]> wrote: > Paul; For the most part his looks OK. I wonder if what you really > want is to compare the user input directly in a FILTER, i.e.: > FILTER regex(?ext = "rdf") > > By "nothing is happening", do you mean that neither the 'if' or 'else' > branches are executing (confirmed via console)? > -- Scott > > On Jun 17, 2:25 am, PaulZH <[email protected]> wrote: > > > I have following working SPARQLMotion pipeline: > > - import current RDF > > - two inputs from user asked: a class (as resource) and a > > serialisation "rdf", "n3" (as literal) > > - iterate over the instances of class > > - filter triples to triples where subject = instance > > - save rdf > > >>>- load rdf as xml > > >>>- transform to html using xslt > > >>>- save html > > > However I only want to happen the steps indicated with >>> if the > > serialisation choosen is "rdf". > > > So I added in between a BranchByAsk, first having tested the SPARQL > > ASK > > ASK WHERE { > > ?x a :FileFormat2Convert. > > ?x :extensie 'rdf'^^xsd:string .} > > > ---> TRUE > > > ASK WHERE { > > ?x a :FileFormat2Convert. > > ?x :extensie 'n3'^^xsd:string .} > > > ---> FALSE > > > Query generalized to > > ASK WHERE { > > ?x a :FileFormat2Convert . > > ?x :extensie ?ext . > > > } > > > where ?ext is the variable passed from previous steps > > > In the console you see the binding. > > Result variables of Iterate over select_2: > > - agent = <http:/.......> > > - ext (xsd:string) = rdf > > > The first step to be carried out (load rdf as xml) is placed now in > > the if branch. > > > _:b1 sp:varName "x"^^xsd:string . > > > :BranchByAsk_1 > > a sml:BranchByAsk ; > > rdfs:label "Branch by ask_1"^^xsd:string ; > > sm:if :ImportXMLFile_1 ; > > sm:nodeX 834 ; > > sm:nodeY 224 ; > > sml:askQuery > > [ a sp:Ask ; > > sp:where ([ sp:object :FileFormat2Convert ; > > sp:predicate rdf:type ; > > sp:subject _:b1 > > ] [ sp:object > > [ sp:varName "ext"^^xsd:string > > ] ; > > sp:predicate :extensie ; > > sp:subject _:b1 > > ]) > > ] . > > > But nothing is happening. > > > What am I missing? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. 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-composer-users?hl=en -~----------~----~----~----~------~----~------~--~---
