You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As #4 explains, XSPARQL tries to guess whether a term is a URL or literal. Such guessing is error-prone and completely unnecessary: it should know if something is a URL or not from the script, no guessing is necessary.
Eg consider this script
prefix ex: <http://example.org>
declareoption saxon:output "method=text";
let $http := "http://this is a literal"let $ftp := "ftp://this.is.url.com/"let $url := "relative-URL"
construct {
ex:subj ex:prop
"http://this is a literal",
$http,
<{$http}>,
<ftp://this.is.url.com/>,
$ftp,
<{$ftp}>,
$url,
<{$url}>.
}
The output is as follows
ex:subj ex:prop "http://this is a literal" . # OK
ex:subj ex:prop <http://this is a literal> . # NOK
ex:subj ex:prop <http://this is a literal> . # OK
ex:subj ex:prop <ftp://this.is.url.com/> . # OK
ex:subj ex:prop "ftp://this.is.url.com/" . # OK
ex:subj ex:prop ftp://this.is.url.com/ . # NOK and a syntax error
ex:subj ex:prop "relative-URL" . # OK
ex:subj ex:prop <relative-URL> . # OK
You see that the guessing makes two mistakes:
for $http it wrongly assumes a URL because it starts with http://
for <{$ftp}> it fails to emit a URL (because the guessing is incomplete, see list of URL schemes is incomplete #4) but fails to emit a literal either (because <...> indicates a URL)
The text was updated successfully, but these errors were encountered:
As #4 explains, XSPARQL tries to guess whether a term is a URL or literal. Such guessing is error-prone and completely unnecessary: it should know if something is a URL or not from the script, no guessing is necessary.
Eg consider this script
The output is as follows
You see that the guessing makes two mistakes:
$http
it wrongly assumes a URL because it starts withhttp://
<{$ftp}>
it fails to emit a URL (because the guessing is incomplete, see list of URL schemes is incomplete #4) but fails to emit a literal either (because<...>
indicates a URL)The text was updated successfully, but these errors were encountered: