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/
and
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"^^<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> }

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> }

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


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.


Reply via email to