Skip to content

Commit e4249a2

Browse files
committed
Clarify that lexicographical order uses code point ordering.
For #416.
1 parent 913f576 commit e4249a2

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

common/terms.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<section><h3>Terms imported from Other Specifications</h3>
2-
<p>Terms imported from [[[ECMASCRIPT]]] [[ECMASCRIPT]], [[[RFC8259]]] [[RFC8259]], [[[INFRA]]] [[INFRA]], and [[[WEBIDL]]] [[WEBIDL]]</p>
2+
<p>Terms imported from [[[ECMASCRIPT]]] [[ECMASCRIPT]], [[[RFC8259]]] [[RFC8259]], [[[INFRA]]] [[INFRA]], [[[XPATH-FUNCTIONS]]] [[XPATH-FUNCTIONS]], and [[[WEBIDL]]] [[WEBIDL]]</p>
33
<dl class="termlist" data-sort>
44
<dt><dfn data-cite="INFRA#list" class="preserve">array</dfn></dt><dd>
55
In the JSON serialization,
@@ -55,6 +55,15 @@
5555
is a sequence of zero or more Unicode (UTF-8) characters,
5656
wrapped in double quotes, using backslash escapes (if necessary).
5757
A character is represented as a single character string.</dd>
58+
<dt><dfn data-cite="XPATH-FUNCTIONS#codepoint-collation" data-lt="code point order|code point ordered|unicode codepoint collation">Unicode code point order</dfn></dt>
59+
<dd>This refers to determining the order of two Unicode strings (`A` and `B`),
60+
using <a>Unicode Codepoint Collation</a>,
61+
as defined in [[[XPATH-FUNCTIONS]]] [[XPATH-FUNCTIONS]],
62+
which defines a
63+
<a href="https://en.wikipedia.org/wiki/Total_order">total ordering</a>
64+
of <a>strings</a> comparing <a data-cite="INFRA#code-point">code points</a>.
65+
Note that for UTF-8 encoded strings, comparing the byte sequences gives the same result as <a>code point order</a>.
66+
</dd>
5867
</dl>
5968

6069
<p>Terms imported from [[[RFC3987]]] [[RFC3987]]</p>

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,13 +3526,13 @@ <h3>Using the Document Base for the Default Vocabulary</h3>
35263526
would still be in effect when traversing into another <a>node object</a>.</p>
35273527

35283528
<p>When expanding, each value of <code>@type</code> is considered
3529-
(ordering them lexicographically) where that value is also a <a>term</a> in
3529+
(in <a>code point order</a>) where that value is also a <a>term</a> in
35303530
the <a>active context</a> having its own <a>type-scoped context</a>.
35313531
If so, that the <a>scoped context</a> is applied to the <a>active context</a>.</p>
35323532

35333533
<p class="note">The values of <code>@type</code> are unordered, so if multiple
35343534
types are listed, the order that <a>type-scoped contexts</a> are applied is based on
3535-
lexicographical ordering.</p>
3535+
a>code point ordering</a>.</p>
35363536

35373537
<p>For example, consider the following semantically equivalent examples.
35383538
The first example, shows how properties and types can define their own
@@ -12877,7 +12877,7 @@ <h3>Serializing/Deserializing RDF</h3>
1287712877
and furthermore comply with the following constraints:
1287812878
<ul>
1287912879
<li>It MUST NOT contain any unnecessary whitespace,</li>
12880-
<li>Keys in objects MUST be ordered lexicographically,</li>
12880+
<li>Keys in objects MUST be in <a>code point order</a>,</li>
1288112881
<li>Native Numeric values MUST be serialized according to
1288212882
<a data-cite="?ECMASCRIPT#sec-tostring-applied-to-the-number-type">Section 7.1.12.1</a> of [[?ECMASCRIPT]],</li>
1288312883
<li>Strings MUST be serialized with Unicode codepoints from <code>U+0000</code> through <code>U+001F</code>
@@ -13877,6 +13877,7 @@ <h2>Changes since Recommendation of 16 July 2020</h2>
1387713877
<li>Fixed typo in <a href="#alternate-document-location" class="sectionRef"></a> where "HTTP document" was intended to be "HTML document".</li>
1387813878
<li>Allow further structured extensions of `application/ld+json` by using
1387913879
`+ld+json` as a structured media extension. See <a href="#structured-extension-ld-json"></a>.</li>
13880+
<li>Use <a>code point order</a> as a better definition for the more vague "lexicographical order".</li>
1388013881
</ul>
1388113882
</section>
1388213883

0 commit comments

Comments
 (0)