Hello Alex

I can add one more pragma like "define sql:accept-invalid-literals 1"
for compile-time, but first I'd like to know what behavior is
preferable:

Variant 1: the invalid literal is stored as string "1,200" and type
xsd:float . Later, the FILTER (datatype (?o) = xsd:float) in query will
not guarantee that expression ?o+1 returns a value without an error.
That means that any application that can occasionally access that data
is in danger as soon as it does not have strict FROM clause. However the
trick will work nice if the database is used by only one application and
it's convenient for plain storing and printing that would be a simple
"garbage in --- garbage out".

Variant 2: the invalid literal is stored as an untyped string "1,200" .

Variant 3: the invalid literal is stored with some custom type like
"1,200"^^virtrdf:bad-float, so the name of xsd:float type is not used in
vain and virtrdf:bad-float-s can be refined later.

Best Regards,

Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com

On Sun, 2014-04-13 at 12:32 +0200, Alex Stolz wrote:
> Hi,
> 
> I am running Virtuoso 7.1.0 (build 07.10.3208) -> fresh download from Github!
> 
> Is it possible with Virtuoso to disable the strict validation of triples 
> during insertion (using SPARQL 1.1 Update feature)? Because I would need to 
> insert them as they are and only afterwards check for correctness.
> 
> To give an example, the following query will trigger an error because "1,200" 
> is not of type xsd:float.
> 
> INSERT IN GRAPH <urn:test> {
>   <#object> <#wrongNumericValue> "1,200"^^xsd:float .
> }
> 
> The error message is:
> 
> Virtuoso 22005 Error SR334: Invalid floating point value converting '1,200'
> 
> SPARQL query:
> define sql:big-data-const 0 
> #output-format:text/html
> define sql:signal-void-variables 1 INSERT IN GRAPH <urn:test> {
>   <#object> <#wrongNumericValue> "1,200"^^xsd:float .
> }
> 
> I hope there exists a straightforward solution. Thanks in advance.
> 
> Best
> Alex
> 
> Alex Stolz
> E-Business & Web Science Research Group
> Universität der Bundeswehr München
> 
> e-mail:  alex.st...@ebusiness-unibw.org
> phone:   +49-(0)89-6004-4218
> fax:     +49-(0)89-6004-4620
> skype:   stalsoft.com
> 
> 
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to