-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPARQL: what is "999"^^xsd:byte > 0 ? #45
Comments
@joernhees - please do generate a pull request. |
in which case are not both the stardog and the rdflib results conformant? |
to be honest: i'm neither entirely sure which result i'd actually expect, nor what kind of test this is (syntax / eval?). And should one argue that while |
The dispatch for the expression (And even if it were considered as one, then the operator is op:numeric-greater-than from "XQuery functions and operators" where it's an error.) What happens on errors is not defined by the SPARQL spec. Usually that allows extension such as new datatypes e.g. |
that last is the question. are extensions truly precluded from defining a
result for that term?
Am 02.06.2017 12:34 nachm. schrieb "Andy Seaborne" <[email protected]
:
"999"^^<http://www.w3.org/2001/XMLSchema#byte> is a valid RDF term but not
a valid numeric value because "999" is outside the lexical restriction for
xsd:byte lexical forms (maxInclusive=127).
The dispatch for the expression "999"^^xsd:byte > 0 is not defined by
SPARQL (see section 17.3) and it's an error because "999"^^xsd:byte is not
a numeric value.
(And even if it were considered as one, then the operator is
op:numeric-greater-than from "XQuery functions and operators" where it's an
error.)
What happens on errors is not defined by the SPARQL spec. Usually that
allows extension such as new datatypes e.g. "abc"^^:myHexDatatype. xsd:byte
is already defined by XML Datatypes.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#45 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALs7lvcxydN4xuWoI3QKd08tINGoQCpks5r_-U7gaJpZM4NpfxC>
.
|
SPARQL perspective - no, it is not precluded as an extension. Extension don't even have to To claim that "999"^^xsd:byte is a valid XSD byte is violating the XSD spec. A complication in this example is that XSD operations are defined for integer/decimal/float/double. The violation is actually on the promotion of the numeric if the extension is to pass on to |
so long as the results for well defined terms are those defined by the respective recommendation, where does "extension" lead to "violation"?
that leaves the exclusion of "999"^^xsd:byte in the realm of "academic" rather than "common sense". |
Because software is written by reading the
Note that |
rdf4j (GraphDB) also returns true. IMHO this should return undef, just like these return undef (on rdf4j):
|
Bear in mind the difference between what the culmination of all normatively referenced specs say and what we expect implementations to include (i.e. what we include in the test suite). There are a few cases where we deliberately look away in order to minimize both the implementation and runtime burdens. An example is that SPARQL (and Turtle, etc.) are supposed to consume absolute IRIs. The grammars include productions that limit the character set but in no way ensure conformance with protocols (e.g. all of the things that are allowed or not after "http:"). Similarly, we could avoid making implementations test the ranges of inputs to (I personally think that the the differential interop over semantically-questionable graphs is worth the increased implementation burden, so yeah, add the test and expect it to fail). |
999 doesn't fit into xsd:byte, which is a signed 8 bit int...
would be nice to have a test for defined behavior of query:
SELECT ( "999"^^<http://www.w3.org/2001/XMLSchema#byte> > 0 AS ?result ) {}
results in the wild:
also see RDFLib/rdflib#737
The text was updated successfully, but these errors were encountered: