Skip to content

Commit 84de36b

Browse files
authored
Merge pull request #4579 from handrews/xml-iri
Allow IRIs for XML namespaces
2 parents d198ac3 + 5fdd275 commit 84de36b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/oas.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3968,7 +3968,7 @@ See examples for expected behavior.
39683968
| Field Name | Type | Description |
39693969
| ---- | :----: | ---- |
39703970
| <a name="xml-name"></a>name | `string` | Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `"array"` (outside the `items`), it will affect the wrapping element if and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored. |
3971-
| <a name="xml-namespace"></a>namespace | `string` | The URI of the namespace definition. Value MUST be in the form of a non-relative URI. |
3971+
| <a name="xml-namespace"></a>namespace | `string` | The IRI ([[RFC3987]]) of the namespace definition. Value MUST be in the form of a non-relative IRI. |
39723972
| <a name="xml-prefix"></a>prefix | `string` | The prefix to be used for the [name](#xml-name). |
39733973
| <a name="xml-attribute"></a>attribute | `boolean` | Declares whether the property definition translates to an attribute instead of an element. Default value is `false`. |
39743974
| <a name="xml-wrapped"></a>wrapped | `boolean` | MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `<books><book/><book/></books>`) or unwrapped (`<book/><book/>`). Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside the `items`). |
@@ -3977,9 +3977,8 @@ This object MAY be extended with [Specification Extensions](#specification-exten
39773977

39783978
The `namespace` field is intended to match the syntax of [XML namespaces](https://www.w3.org/TR/xml-names11/), although there are a few caveats:
39793979

3980-
* Versions 3.1.0, 3.0.3, and earlier of this specification erroneously used the term "absolute URI" instead of "non-relative URI", so authors using namespaces that include a fragment should check tooling support carefully.
3981-
* XML allows but discourages relative URI-references, while this specification outright forbids them.
3982-
* XML 1.1 allows IRIs ([RFC3987](https://datatracker.ietf.org/doc/html/rfc3987)) as namespaces, and specifies that namespaces are compared without any encoding or decoding, which means that IRIs encoded to meet this specification's URI syntax requirement cannot be compared to IRIs as-is.
3980+
* Versions 3.1.0, 3.0.3, and earlier of this specification erroneously used the term "absolute URI" instead of "non-relative URI" ("non-relative IRI" as of OAS v3.2.0), so authors using namespaces that include a fragment should check tooling support carefully.
3981+
* XML allows but discourages relative IRI-references, while this specification outright forbids them.
39833982

39843983
##### XML Object Examples
39853984

src/schemas/validation/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ $defs:
6060
name:
6161
type: string
6262
namespace:
63-
format: uri
63+
format: iri
6464
type: string
6565
prefix:
6666
type: string

0 commit comments

Comments
 (0)