Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/fromRdf/0027-in.nq
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@

<http://example.com/boolean-object> <http://example.com/example> "True"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/boolean-object> <http://example.com/example> "False"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/boolean-object> <http://example.com/example> "notnative"^^<http://www.w3.org/2001/XMLSchema#boolean> .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to add a comment to explain the rationale of testing "True" and "False",
and defusing the misunderstanding that they should be treated specifically.

Suggested change
<http://example.com/boolean-object> <http://example.com/example> "notnative"^^<http://www.w3.org/2001/XMLSchema#boolean> .
# NB: the two values above ("True" and "False") are *not* in the lexical space of xsd:bool, so they should be treated as any other invalid lexical form (like "notnative" below)
<http://example.com/boolean-object> <http://example.com/example> "notnative"^^<http://www.w3.org/2001/XMLSchema#boolean> .


<http://example.com/number-native> <http://example.com/example> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .

<http://example.com/number-object> <http://example.com/example> "0.1e999999999999999"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/number-object> <http://example.com/example> "+INF"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/number-object> <http://example.com/example> "-INF"^^<http://www.w3.org/2001/XMLSchema#double> .

<http://example.com/number-object> <http://example.com/example> "notnative"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/number-object> <http://example.com/example> "notnative"^^<http://www.w3.org/2001/XMLSchema#double> .
12 changes: 12 additions & 0 deletions tests/fromRdf/0027-out.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
{
"@type": "http://www.w3.org/2001/XMLSchema#boolean",
"@value": "False"
},
{
"@type": "http://www.w3.org/2001/XMLSchema#boolean",
"@value": "notnative"
}
]
},
Expand All @@ -46,6 +50,14 @@
{
"@type": "http://www.w3.org/2001/XMLSchema#double",
"@value": "-INF"
},
{
"@type": "http://www.w3.org/2001/XMLSchema#integer",
"@value": "notnative"
},
{
"@type": "http://www.w3.org/2001/XMLSchema#double",
"@value": "notnative"
}
]
}
Expand Down
Loading