Hi,

When I try to use fn:concat and afn:strJoin in the following fashion:

PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>

select ?ALLTEXT ?d ?e ?h ?j ?k ?l where{

  ?a rdf:type foaf:Person ; ?b ?c .
  ?c rdf:type core:Position .

   optional { ?c core:hrJobTitle ?d . } .
   optional { ?c core:involvedOrganizationName ?e . } .
   optional   { ?c core:positionForPerson ?f . ?f rdfs:label ?h .}
   optional { ?c core:positionInOrganization ?i . ?i rdfs:label ?j .}
   optional { ?c core:titleOrRole ?k .}
   optional { ?c rdfs:label ?l . }

LET (?ALLTEXT := fn:concat(?k, " ", ?l )) .
LET (?ALLTEXT := afn:strJoin(?k, " ", ?l ))
}


The variable ALLTEXT gets populated only when both ?k and ?l are not empty. 
When one
Of them is empty, ALLTEXT is showing an empty result.

How would I modify this behavior? Ideally, you would expect fn:concat to 
concatenate even empty results.

Am I doing anything wrong here?

Thanks,
Deepak Konidena.

Reply via email to