Skip to content

Commit f367d47

Browse files
committed
Reorganize plain name fragment requirements
In response to PR review feedback, remove the editorial explanation and instead consolidate the fragment syntax in the section on fragments. The context and reason for the syntax is more clear there with the existing text, and one additional line further clarifies it by not just seeming to reference a random XML syntax rule for no clear reason.
1 parent 9e81619 commit f367d47

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

jsonschema-core.xml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<!ENTITY RFC8288 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8288.xml">
1313
<!ENTITY ldp SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml4/reference.W3C.REC-ldp-20150226.xml">
1414
<!ENTITY fragid-best-practices SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml4/reference.W3C.WD-fragid-best-practices-20121025.xml">
15+
<!ENTITY xptr-framework SYSTEM "https://bib.ietf.org/public/rfc/bibxml4/reference.W3C.REC-xptr-framework-20030325.xml">
1516
]>
1617
<?rfc toc="yes"?>
1718
<?rfc symrefs="yes"?>
@@ -513,7 +514,18 @@
513514
Per the W3C's
514515
<xref target="W3C.WD-fragid-best-practices-20121025">best practices for fragment identifiers</xref>,
515516
plain name fragment identifiers in "application/schema+json" are reserved for referencing
516-
locally named schemas. All fragment identifiers that do
517+
locally named schemas.
518+
</t>
519+
<t>
520+
Plain name fragments MUST start with a letter ([A-Za-z]) or underscore ("_"),
521+
followed by any number of letters, digits ([0-9]), hyphens ("-"),
522+
underscores ("_"), and periods ("."). This matches the US-ASCII part of XML's
523+
<xref target="xml-names">NCName production</xref>, which allows for compatibility
524+
with the recommended plain name <xref target="W3C.REC-xptr-framework-20030325">syntax</xref> for
525+
XML-based media types.
526+
</t>
527+
<t>
528+
All fragment identifiers that do
517529
not match the JSON Pointer syntax MUST be interpreted as
518530
plain name fragment identifiers.
519531
</t>
@@ -1455,14 +1467,9 @@
14551467
need for "$dynamicAnchor".
14561468
</t>
14571469
<t>
1458-
If present, the value of this keyword MUST be a string and MUST start with
1459-
a letter ([A-Za-z]) or underscore ("_"), followed by any number of letters,
1460-
digits ([0-9]), hyphens ("-"), underscores ("_"), and periods (".").
1461-
Due to the once-common practice of providing resource representations in
1462-
both JSON and XML, this matches the US-ASCII part of XML's
1463-
<xref target="xml-names">NCName production</xref>, which is noted in the
1464-
<xref target="W3C.WD-fragid-best-practices-20121025">WC3's best practices for fragment identifiers</xref>
1465-
as the typical plain name syntax for XML-based formats.
1470+
If present, the value of this keyword MUST be a string and MUST conform
1471+
to the plain name fragment identifier syntax defined in section
1472+
<xref target="fragments" format="counter"></xref>.
14661473
<cref>
14671474
Note that the anchor string does not include the "#" character,
14681475
as it is not a IRI-reference. An "$anchor": "foo" becomes the
@@ -3558,6 +3565,7 @@ https://example.com/schemas/common#/$defs/allOf/1
35583565
&RFC7231;
35593566
&RFC8288;
35603567
&fragid-best-practices;
3568+
&xptr-framework;
35613569
<reference anchor="json-schema-validation">
35623570
<front>
35633571
<title>JSON Schema Validation: A Vocabulary for Structural Validation of JSON</title>

0 commit comments

Comments
 (0)