Greetings,

I've been unable to get default values working for spl:Arguments when
used in spin functions and templates under TBC-ME
3.4.0.v20101130-1222R .  When no argument is given, the default value
never gets applied. Below is a sample function that applies a default
and a test SPARQL query.

Another note, in spin templates the default value is not applied in
the spin:labelTemplate .  This may be another appearance of the same
bug, or a feature that has not been implemented.  If the later case, I
would make this a feature request.

thanks,

-Daniel


-------8<------------------------------8<-------------------------------------------
:useDefault
      rdf:type spin:Function ;
      rdfs:label "use default"^^xsd:string ;
      rdfs:subClassOf spin:Functions ;
      spin:body
              [ rdf:type sp:Select ;
                sp:resultVariables (spin:_arg1) ;
                sp:where ()
              ] ;
      spin:constraint
              [ rdf:type spl:Argument ;
                spl:defaultValue "The Default"^^xsd:string ;
                spl:optional "true"^^xsd:boolean ;
                spl:predicate sp:arg1 ;
                spl:valueType xsd:string
              ] .

-------8<------------------------------8<-------------------------------------------

SELECT ?useArg1 ?useDefault
WHERE {
    LET( ?useArg1 := :useDefault("hello") ) .
    LET( ?useDefault:= :useDefault() ) .
}

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion 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

Reply via email to