@@ -116,9 +116,10 @@ A ``purl`` string is an ASCII URL string composed of seven components.
116116
117117Except as expressly stated otherwise in this section, each component:
118118
119- - MAY be composed of any of the characters defined in the "Permitted
120- characters" section
121- - MUST be encoded as defined in the "Character encoding" section
119+ - MAY be composed of any of the characters defined in the "`Permitted characters `_" section
120+ - MUST be encoded as defined in the "`Character encoding `_" section
121+
122+ The "lowercase" rules are defined in the "`Case folding `_" section.
122123
123124The rules for each component are:
124125
@@ -134,7 +135,7 @@ The rules for each component are:
134135- **type **:
135136
136137 - The package ``type `` MUST be composed only of ASCII letters and numbers,
137- period '.', plus '+', and dash '-'.
138+ period '.', and dash '-'.
138139 - The ``type `` MUST start with an ASCII letter.
139140 - The ``type `` MUST NOT be percent-encoded.
140141 - The ``type `` is case insensitive. The canonical form is lowercase.
@@ -168,7 +169,7 @@ The rules for each component are:
168169 stripped in the canonical form. They are not part of the ``name ``.
169170 - A ``name `` MUST be a percent-encoded string.
170171 - When percent-decoded, a ``name `` MAY contain any Unicode character unless
171- prohibited by the package's ``type `` definition in `< PURL-TYPES.rst >`_ .
172+ the package's ``type `` definition provides otherwise .
172173
173174
174175- **version **:
@@ -205,7 +206,7 @@ The rules for each component are:
205206 - A ``key `` MUST NOT be percent-encoded.
206207 - Each ``key `` MUST be unique among all the keys of the ``qualifiers ``
207208 component.
208- - A ``value `` MAY be composed of any character and all characters MUST be
209+ - A ``value `` MAY contain any Unicode character and all characters MUST be
209210 encoded as described in the "Character encoding" section.
210211
211212
@@ -219,9 +220,11 @@ The rules for each component are:
219220 - Each ``subpath `` segment MUST be a percent-encoded string
220221 - When percent-decoded, a segment:
221222
222- - MUST NOT contain a '/'
223- - MUST NOT be any of '..' or '.'
223+ - MUST NOT contain any slash '/' characters
224224 - MUST NOT be empty
225+ - MUST NOT be any of '..' or '.'
226+ - MAY contain any Unicode character other than '/' unless the package's
227+ ``type `` definition provides otherwise.
225228
226229 - The ``subpath `` MUST be interpreted as relative to the root of the package
227230
@@ -234,7 +237,6 @@ A canonical ``purl`` is composed of these permitted ASCII characters:
234237- the Alphanumeric Characters: ``A to Z ``, ``a to z ``, ``0 to 9 ``,
235238- the Punctuation Characters: ``.-_~ `` (period '.',
236239 dash '-', underscore '_' and tilde '~'),
237- - the Plus Character: ``+ `` (plus '+'),
238240- the Percent Character: ``% `` (percent sign '%'), and
239241- the Separator Characters ``:/@?=&# `` (colon ':', slash '/', at sign '@',
240242 question mark '?', equal sign '=', ampersand '&' and pound sign '#').
@@ -286,6 +288,16 @@ Character encoding
286288- With the exception of the percent-encoding mechanism, the rules regarding
287289 percent-encoding are defined by this specification alone.
288290
291+ Case folding
292+ ~~~~~~~~~~~~
293+
294+ References to "lowercase" in this specification refer to the **culture-invariant **
295+ full case mapping defined in
296+ `Section 3.13.2 of the Unicode Standard <https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-3/#G34078 >`_.
297+
298+ When applied to the ASCII character set, this operation converts uppercase
299+ Latin letters (``A to Z ``) to their corresponding lowercase forms (``a to z ``).
300+ All other ASCII characters remain unchanged.
289301
290302How to build ``purl `` string from its components
291303~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -340,7 +352,7 @@ To build a ``purl`` string from its components:
340352
341353 - Discard any pair where the ``value `` is empty.
342354 - UTF-8-encode each ``value `` if needed in your programming language
343- - If the ``key `` is ``checksums `` and this is a list of `` checksums `` join this
355+ - If the ``key `` is ``checksum `` and this is a list of checksums join this
344356 list with a ',' to create this qualifier ``value ``
345357 - Create a string by joining the lowercased ``key ``, the equal '=' sign and
346358 the percent-encoded ``value `` to create a qualifier
@@ -396,8 +408,8 @@ To parse a ``purl`` string in its components:
396408 - The ``value `` is the percent-decoded right side
397409 - UTF-8-decode the ``value `` if needed in your programming language
398410 - Discard any key/value pairs where the value is empty
399- - If the ``key `` is ``checksums ``, split the ``value `` on ',' to create
400- a list of `` checksums ``
411+ - If the ``key `` is ``checksum ``, split the ``value `` on ',' to create
412+ a list of checksums
401413
402414 - This list of key/value is the ``qualifiers `` object
403415
@@ -463,6 +475,13 @@ download URL, VCS URL or checksums in an API, database or web form.
463475With this warning, the known ``key `` and ``value `` defined here are valid for use in
464476all package types:
465477
478+ - ``vers `` allows the specification of a version range.
479+ The value MUST adhere to the `Version Range Specification <VERSION-RANGE-SPEC.rst >`_.
480+ This qualifier is mutually exclusive with the ``version `` component.
481+ For example::
482+
483+ pkg:pypi/django?vers=vers:pypi%2F%3E%3D1.11.0%7C%21%3D1.11.1%7C%3C2.0.0
484+
466485- ``repository_url `` is an extra URL for an alternative, non-default package
467486 repository or registry. When a package does not come from the default public
468487 package repository for its ``type `` a ``purl `` may be qualified with this extra
0 commit comments