|
1399 | 1399 | <xref target="RFC3986">RFC 3986 section 5.1.2</xref> regarding
|
1400 | 1400 | encapsulating entities, if an "$id" in a subschema is a relative
|
1401 | 1401 | IRI-reference, the base IRI for resolving that reference is the IRI of
|
1402 |
| - the parent schema resource. |
| 1402 | + the parent schema resource. Note that an "$id" consisting of an empty IRI or |
| 1403 | + of the empty fragment only will result in the embedded resource having |
| 1404 | + the same IRI as the encapsulating resource, which SHOULD be considered |
| 1405 | + an error per section <xref target="duplicate-iris" format="counter"></xref>. |
1403 | 1406 | </t>
|
1404 | 1407 | <t>
|
1405 | 1408 | If no parent schema object explicitly identifies itself as a resource
|
|
1463 | 1466 | fragment "#foo" when used in a IRI. See below for full examples.
|
1464 | 1467 | </cref>
|
1465 | 1468 | </t>
|
| 1469 | + </section> |
| 1470 | + |
| 1471 | + <section title="Duplicate schema identifiers" anchor="duplicate-iris"> |
| 1472 | + <t> |
| 1473 | + A schema MAY (and likely will) have multiple IRIs, but there is no way |
| 1474 | + for an IRI to identify more than one schema. When multiple schemas |
| 1475 | + attempt to identify as the same IRI through the use of "$id", "$anchor", |
| 1476 | + "$dynamicAnchor", or any other mechanism, implementations SHOULD raise |
| 1477 | + an error condition. Otherwise the result is undefined, and even if |
| 1478 | + documented will not be interoperable. |
| 1479 | + </t> |
1466 | 1480 | <t>
|
1467 |
| - The effect of specifying the same fragment name multiple times within |
1468 |
| - the same resource, using any combination of "$anchor" and/or |
1469 |
| - "$dynamicAnchor", is undefined. Implementations MAY |
1470 |
| - raise an error if such usage is detected. |
| 1481 | + Note that due to the semantics of JSON Pointer fragments, schema IRIs |
| 1482 | + that differ only by the presence or absence of an empty fragment MUST |
| 1483 | + be considered duplicates. |
1471 | 1484 | </t>
|
1472 | 1485 | </section>
|
1473 | 1486 |
|
|
1678 | 1691 | be noted within a schema document as it is processed, producing associations
|
1679 | 1692 | as shown in appendix <xref target="idExamples" format="counter"></xref>.
|
1680 | 1693 | </t>
|
1681 |
| - <t> |
1682 |
| - A schema MAY (and likely will) have multiple IRIs, but there is no way for a |
1683 |
| - IRI to identify more than one schema. When multiple schemas try to identify |
1684 |
| - as the same IRI, validators SHOULD raise an error condition. |
1685 |
| - </t> |
1686 | 1694 | </section>
|
1687 | 1695 |
|
1688 | 1696 | <section title="Detecting a Meta-Schema">
|
|
0 commit comments