Thanks a lot - Point noted on the incorrect time zone format.
Regarding the latitude/longitude, my mistake and I suppose float would be
the most appropriate:
INSERT DATA {
<http://someURI>
<http://someURI/Latitude>
"51.5049832"^^<http://www.w3.org/2001/XMLSchema#xsd:float>
}
Regarding the parse error with the quotations:
- Replacement with single ' worked fine.
- Replacement with \" allows the insert to occur but the \ is then
contained in the literal that is inserted:
INSERT DATA { <http://someURI> <http://someURI/hasText> "How to deal with a
quotation \" in the middle of a string"}
- Replacement with """ results in a parse error again.
INSERT DATA { <http://someURI> <http://someURI/hasText> "How to deal with a
quotation """ in the middle of a string"}
Forgive me if I misunderstood something on this topic.
Regards.
On Sun, Aug 11, 2013 at 9:35 PM, Andy Seaborne <[email protected]> wrote:
> On 11/08/13 19:16, Iain Ritchie wrote:
>
>> Hi,
>>
>> I wonder if someone can offer some advice on the following topics.
>>
>> Firstly regarding typed literal compliance - Do the following typed
>> literals appear to be correct in terms of their format?
>>
>
> See
> http://www.w3.org/TR/**xmlschema11-2/<http://www.w3.org/TR/xmlschema11-2/>
> and
> http://www.w3.org/TR/xpath-**functions/<http://www.w3.org/TR/xpath-functions/>
> (which has lots of examples)
>
>
>
>> INSERT DATA { <http://someURI> <http://someURI/hasDateTime>
>> "2013-08-11T16:35:33+0100"^^<h**ttp://www.w3.org/2001/**
>> XMLSchema#dateTime <http://www.w3.org/2001/XMLSchema#dateTime>> }
>>
>
> No.
> +01:00
>
>
>
>> INSERT DATA { <http://someURI> <http://someURI/Longitude>
>> "-0.18237161"^^<
>> http://www.w3.org/2001/**XMLSchema#Long<http://www.w3.org/2001/XMLSchema#Long>>
>> }
>>
>
> No
> It's xsd:long
> and -0.18237161 is not an integer.
>
>
>
>> INSERT DATA { <http://someURI> <http://someURI/Latitude> "51.5049832"^^<
>> http://www.w3.org/2001/**XMLSchema#Long<http://www.w3.org/2001/XMLSchema#Long>>
>> }
>>
>
> No. Ditto.
>
> Does not cause an INSERT to fail - you just don't get what you intended.
>
>
> Secondly, regarding special characters encountered during the insertion of
>> a string literal:
>>
>> INSERT DATA { <http://someURI> <http://someURI/hasText> "How to deal
>> with a
>> quotation" in the middle of a string"}
>>
>
> This is a parse error.
>
> \"
> or use '-quotes.
> or use """ quotes
>
> try
> http://www.sparql.org/update-**validator.html<http://www.sparql.org/update-validator.html>
>
>
>
> Can anyone offer some advice as to how I can deal with this issue (whilst
>> preserving the extra quotation mark), and also any other special
>> characters
>> that may cause the insert to fail?
>>
>> Many Thanks as always.
>>
>>
>