Fix use native types flag with non-native values#671
Conversation
|
Unless there is a better idea for refactoring the spec algorithm in this place (see #670), I'll probably implement the fix similarly to how I'll fix it in TRLD: niklasl/trld@a66feee (i.e. add a |
|
I made a possibly cleaner approach in niklasl/trld@5fe0981 (explained in that commit message). Any feedback welcome; I'll probably proceed with fixing the spec algorithm accordingly in the coming week. |
Test use native types flag with non-native values.
5185051 to
ad93494
Compare
When useNativeTypes is true, the else clause was never reached even if a native type couldn't be used; leaving only plain strings where e.g. language-tagged string literals were the source. This is a slight refactoring of the RDF to Object Conversion algorithm, to address this issue, whilst keeping or improving the clarify of the algorithm. Fixes w3c#670
|
I've now implemented what I see as an acceptable fix, both in TRLD: niklasl/trld#5 (which now passes all fromRdf tests including the one added in this PR); and as a proposed spec change in this PR. It is a slight refactoring of the RDF to Object Conversion algorithm, to address this issue whilst also keeping or seeking to improve the clarify of the algorithm. |
| and {{JsonLdOptions/rdfDirection}} is `i18n-datatype`: | ||
| <ol> | ||
| <li>If the string prefix of the <a data-cite="RFC3986#section-3.5">fragment identifier</a> | ||
| of the <a>datatype IRI</a> up until the underscore (`"_"`) is not empty, |
There was a problem hiding this comment.
| of the <a>datatype IRI</a> up until the underscore (`"_"`) is not empty, | |
| of the <a>datatype IRI</a> up until the underscore ("`_`") is not empty, |
There was a problem hiding this comment.
There's a total of 11 occurrences of:
underscore (`"_"`)
in this document. I suggest making a separate PR to change this, rather than make this the odd one out.
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
This addresses #670.
Preview | Diff