Skip to content

Commit 859b577

Browse files
kaseiafsTallTed
authored
Clarify LANGMATCHES handling of empty strings. (#316)
* Clarify LANGMATCHES handling of empty strings. * Update spec/index.html Co-authored-by: Andy Seaborne <[email protected]> * Update spec/index.html Co-authored-by: Andy Seaborne <[email protected]> * Update spec/index.html Co-authored-by: Ted Thibodeau Jr <[email protected]> --------- Co-authored-by: Andy Seaborne <[email protected]> Co-authored-by: Ted Thibodeau Jr <[email protected]>
1 parent a4eb218 commit 859b577

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

spec/index.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7453,14 +7453,18 @@ <h5>langMATCHES</h5>
74537453
<pre class="prototype nohighlight"> <span class="return">xsd:boolean</span> <span class="operator">langMatches</span> (<span class="type"><span class="type">xsd:string</span></span> <span class="name">language-tag</span>, <span class="type"><span class="type">xsd:string</span></span> <span class="name">language-range</span>)
74547454
</pre>
74557455

7456-
<p>Returns `true` if the <a data-cite="RDF12-CONCEPTS#dfn-language-tag">language tag</a>
7457-
(first argument) matches <code>language-range</code> (second argument).
7458-
Otherwise, the function returns `false`.
7459-
Matching is performed according to the basic filtering scheme defined in
7460-
[[RFC4647]] section 3.3.1. <code>language-range</code> is a basic language range per
7461-
[[[RFC4647]]] [[RFC4647]] section 2.1. A <code>language-range</code> of "*" matches any
7462-
non-empty <code>language-tag</code> string. Otherwise, the function returns `false`.
7456+
<p>Returns `true` if the argument <code>language-tag</code> (a <a data-cite="RDF12-CONCEPTS#dfn-language-tag">language tag</a>)
7457+
matches the argument <code>language-range</code> (a [basic language range](https://www.rfc-editor.org/rfc/rfc4647#section-2.1) per [[[RFC4647]]] [[RFC4647]] section 2.1)
7458+
according to the basic filtering scheme defined in
7459+
[[RFC4647]] section 3.3.1. Otherwise, the function returns `false`.
7460+
</p>
7461+
7462+
<p>If <code>language-tag</code>, <code>language-range</code>, or both are empty
7463+
(and thus not a valid language tag or language range, respectively),
7464+
the function returns `false`.
74637465
</p>
7466+
7467+
<p>A <code>language-range</code> of "*" matches any non-empty <code>language-tag</code> string.</p>
74647468
<div class="exampleGroup">
74657469
<pre class="data nohighlight">
74667470
PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;

0 commit comments

Comments
 (0)