W3C home > Mailing lists > Public > public-sparql-dev@w3.org > April to June 2010

Using CONSTRUCT to add language tag?

From: Bob DuCharme <bob@snee.com>
Date: Sun, 23 May 2010 18:11:53 -0400
Message-ID: <4BF9A829.4040307@snee.com>
To: public-sparql-dev@w3.org
Does anyone have any suggestions about how a SPARQL CONSTRUCT query 
might add language tags without using extensions? The query below works 
with ARQ, but it uses the Jena extension LET and the concat() function:

  PREFIX anrecs: <http://www.snee.com/ns/analystRatings#>
  PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
  CONSTRUCT {
    ?company anrecs:company ?coNameWithLanguageTag .
  }
  WHERE {
    ?company anrecs:company ?coName .
    LET (?coNameWithLanguageTag := fn:concat(?coName,"@en")) .
  }

thanks,

Bob
Received on Sunday, 23 May 2010 22:12:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:15:50 UTC