- From: Steve Harris <steve.harris@garlik.com>
- Date: Mon, 4 Oct 2010 08:00:16 +0100
- To: Ivan Shmakov <oneingray@gmail.com>
- Cc: semantic-web@w3.org
On 2010-10-01, at 18:28, Ivan Shmakov wrote:
> Section 14.1.2 of the SPARQL 1.1 Query Language specification
> [1] describes a way to introduce values not already present in
> the graphs being queried. E. g.:
>
> …
> SELECT ( fn:concat(?G, " ", ?S) AS ?name )
> …
>
> Section 14.2 describes the CONSTRUCT query, which can be used to
> create a new graph based on one or more existing ones and a
> template.
>
> It makes me wonder, is there a way to introduce new values in
> the CONSTRUCTed graph?
Yes, You can use that projected value in your construct, using a sub query:
CONSTRUCT { [] :name ?name }
WHERE {
{ SELECT ( fn:concat(?G, " ", ?S) AS ?name ) ... }
}
- Steve
--
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203 http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Monday, 4 October 2010 07:00:52 UTC