|
2847 | 2847 | "html": "Initialize <var>type</var> to <code>null</code>" |
2848 | 2848 | }, |
2849 | 2849 | { |
2850 | | - "html": "If <a data-link-for=\"JsonLdOptions\" href=\"https://w3c.github.io/json-ld-api/#dom-jsonldoptions-usenativetypes\" class=\"internalDFN\" data-link-type=\"idl\" id=\"ref-for-dom-jsonldoptions-usenativetypes-6\"><code>useNativeTypes</code></a> is <code>true</code>", |
| 2850 | + "html": "If <a data-link-for=\"JsonLdOptions\" href=\"https://w3c.github.io/json-ld-api/#dom-jsonldoptions-usenativetypes\" class=\"internalDFN\" data-link-type=\"idl\" id=\"ref-for-dom-jsonldoptions-usenativetypes-6\"><code>useNativeTypes</code></a> is <code>true</code>\n <div class=\"candidate correction\" id=\"change_5\">\n <span class=\"marker\">Candidate Correction 5</span>\n <p>This changes behavior when using native numbers where <a data-link-for=\"JsonLdOptions\" href=\"https://w3c.github.io/json-ld-api/#dom-jsonldoptions-usenativetypes\" class=\"internalDFN\" data-link-type=\"idl\" id=\"ref-for-dom-jsonldoptions-usenativetypes-7\"><code>useNativeTypes</code></a> is <code>true</code>.\n For more information, refer to <a href=\"https://github.com/w3c/json-ld-api/issues/555\">issue 555</a>.\n </p>\n <div lang=\"en\" class=\"amendment-toggles removeOnSave\"><button value=\"diff\" disabled=\"\">Show Change</button><button value=\"old\">Show Current</button><button value=\"new\">Show Future</button></div></div>", |
2851 | 2851 | "rationale": "if", |
2852 | 2852 | "steps": [ |
2853 | 2853 | { |
|
2857 | 2857 | "html": "Otherwise, if the\n <a data-cite=\"RDF11-CONCEPTS#dfn-datatype-iri\" data-link-type=\"dfn\" href=\"https://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri\">datatype <abbr title=\"Internationalized Resource Identifier\">IRI</abbr></a>\n of <var>value</var> equals <code>xsd:boolean</code>, set\n <var>converted value</var> to <code>true</code> if the\n <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-5\">lexical form</a>\n of <var>value</var> matches <code>true</code>, or <code>false</code>\n if it matches <code>false</code>. If it matches neither,\n set <var>type</var> to <code>xsd:boolean</code>." |
2858 | 2858 | }, |
2859 | 2859 | { |
2860 | | - "html": "Otherwise, if the\n <a data-cite=\"RDF11-CONCEPTS#dfn-datatype-iri\" data-link-type=\"dfn\" href=\"https://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri\">datatype <abbr title=\"Internationalized Resource Identifier\">IRI</abbr></a>\n of <var>value</var> equals <code>xsd:integer</code> or\n <code>xsd:double</code> and its\n <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-6\">lexical form</a>\n is a valid <code>xsd:integer</code> or <code>xsd:double</code>\n according [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://w3c.github.io/json-ld-api/#bib-xmlschema11-2\" title=\"W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes\">XMLSCHEMA11-2</a></cite>], set <var>converted value</var>\n to the result of converting the\n <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-7\">lexical form</a>\n to a JSON <a data-cite=\"ECMASCRIPT#sec-terms-and-definitions-number-value\" data-link-type=\"dfn\" href=\"https://tc39.es/ecma262/multipage/#sec-terms-and-definitions-number-value\">number</a>." |
| 2860 | + "rationale": "attempt", |
| 2861 | + "steps": [ |
| 2862 | + { |
| 2863 | + "html": "Attempt to convert the <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-8\">lexical form</a> to a <a data-cite=\"ECMASCRIPT#sec-terms-and-definitions-number-value\" data-link-type=\"dfn\" href=\"https://tc39.es/ecma262/multipage/#sec-terms-and-definitions-number-value\">JSON number</a>\n according to the\n [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://w3c.github.io/json-ld-api/#bib-rfc8785\" title=\"JSON Canonicalization Scheme (JCS)\">RFC8785</a></cite>] <a data-cite=\"RFC8785#name-serialization-of-numbers\" href=\"https://www.rfc-editor.org/rfc/rfc8785#name-serialization-of-numbers\">\n JSON Serialization Scheme (JCS) 3.2.2.3 Serialization of Numbers\n </a> procedure." |
| 2864 | + }, |
| 2865 | + { |
| 2866 | + "html": "If the conversion is successful, set <var>converted value</var>\n to its result." |
| 2867 | + }, |
| 2868 | + { |
| 2869 | + "html": "Otherwise, set <var>type</var> to <a data-cite=\"RDF11-CONCEPTS#dfn-datatype-iri\" data-link-type=\"dfn\" href=\"https://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri\">datatype <abbr title=\"Internationalized Resource Identifier\">IRI</abbr></a>\n of <var>value</var>." |
| 2870 | + } |
| 2871 | + ], |
| 2872 | + "html": "Otherwise, if the\n <a data-cite=\"RDF11-CONCEPTS#dfn-datatype-iri\" data-link-type=\"dfn\" href=\"https://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri\">datatype <abbr title=\"Internationalized Resource Identifier\">IRI</abbr></a>\n of <var>value</var> equals <code>xsd:integer</code> or\n <code>xsd:double</code> and its\n <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-6\">lexical form</a>\n is a valid <code>xsd:integer</code> or <code>xsd:double</code>\n according to [<cite><a class=\"bibref\" data-link-type=\"biblio\" href=\"https://w3c.github.io/json-ld-api/#bib-xmlschema11-2\" title=\"W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes\">XMLSCHEMA11-2</a></cite>]<del cite=\"#change_5\">,\n set <var>converted value</var>\n to the result of converting the\n <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-7\">lexical form</a>\n to a JSON <a data-cite=\"ECMASCRIPT#sec-terms-and-definitions-number-value\" data-link-type=\"dfn\" href=\"https://tc39.es/ecma262/multipage/#sec-terms-and-definitions-number-value\">number</a>.\n </del><ins cite=\"#change_5\">:\n \n </ins>" |
2861 | 2873 | } |
2862 | 2874 | ] |
2863 | 2875 | }, |
|
2869 | 2881 | "rationale": "set", |
2870 | 2882 | "steps": [ |
2871 | 2883 | { |
2872 | | - "html": "Set <var>converted value</var> to the <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-8\">lexical form</a> of <var>value</var>." |
| 2884 | + "html": "Set <var>converted value</var> to the <a href=\"https://w3c.github.io/json-ld-api/#dfn-lexical-form\" class=\"internalDFN\" data-link-type=\"dfn\" id=\"ref-for-dfn-lexical-form-9\">lexical form</a> of <var>value</var>." |
2873 | 2885 | }, |
2874 | 2886 | { |
2875 | 2887 | "html": "If the string prefix of the <a data-cite=\"RFC3986#section-3.5\" href=\"https://www.rfc-editor.org/rfc/rfc3986#section-3.5\">fragment identifier</a>\n of the <a data-cite=\"RDF11-CONCEPTS#dfn-datatype-iri\" data-link-type=\"dfn\" href=\"https://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri\">datatype <abbr title=\"Internationalized Resource Identifier\">IRI</abbr></a> up until the underscore (<code>\"_\"</code>) is not empty,\n add an <a data-cite=\"INFRA#map-entry\" data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-entry\">entry</a> <code>@language</code> to <var>result</var> and set its value to that prefix." |
|
0 commit comments