From 9851d5089c86f7fe7b7198b92816f9dca51a3bfc Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Sat, 14 Jun 2025 19:05:55 +0400 Subject: [PATCH 1/3] #656 Specify 0 and 1 as valid Boolean literals in RDF to Object conversion algorithm --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 07e66ace..1748742b 100644 --- a/index.html +++ b/index.html @@ -5503,8 +5503,11 @@

Algorithm

of value equals xsd:boolean, set converted value to true if the lexical form - of value matches true, or false - if it matches false. If it matches neither, + + of value matches "true" or "1", or false + if it matches "false" or "0". + + If it matches neither, set type to xsd:boolean.
  • Otherwise, if the datatype IRI From b3f492c6cb34330f43e1771bd5792ca0a9c966ed Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Sat, 14 Jun 2025 19:06:28 +0400 Subject: [PATCH 2/3] #656 Update fromRdf test 0027 to reflect 0 and 1 as valid Boolean values --- tests/fromRdf/0027-in.nq | 3 +++ tests/fromRdf/0027-out.jsonld | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/tests/fromRdf/0027-in.nq b/tests/fromRdf/0027-in.nq index 8336cb89..03ea5251 100644 --- a/tests/fromRdf/0027-in.nq +++ b/tests/fromRdf/0027-in.nq @@ -1,6 +1,9 @@ "true"^^ . "false"^^ . + "1"^^ . + "0"^^ . + "True"^^ . "False"^^ . diff --git a/tests/fromRdf/0027-out.jsonld b/tests/fromRdf/0027-out.jsonld index dde170cf..1744119d 100644 --- a/tests/fromRdf/0027-out.jsonld +++ b/tests/fromRdf/0027-out.jsonld @@ -6,6 +6,13 @@ {"@value": false} ] }, + { + "@id": "http://example.com/boolean-number", + "http://example.com/example": [ + {"@value": true}, + {"@value": false} + ] + }, { "@id": "http://example.com/boolean-object", "http://example.com/example": [ From 754c6579b29d6baf8f53c7805e7ed878553a72b5 Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Fri, 20 Jun 2025 22:32:31 +0400 Subject: [PATCH 3/3] =?UTF-8?q?Fix=20``=20and=20``=20tag=20usage?= =?UTF-8?q?=20=C2=A9=20@pchampin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pierre-Antoine Champin --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 1748742b..6c6aa58e 100644 --- a/index.html +++ b/index.html @@ -5503,9 +5503,9 @@

    Algorithm

    of value equals xsd:boolean, set converted value to true if the lexical form - - of value matches "true" or "1", or false - if it matches "false" or "0". + + of value matches "true" or "1", or false + if it matches "false" or "0". If it matches neither, set type to xsd:boolean.