Skip to content

Commit f7775a6

Browse files
committed
Plain name IRI fragments can use unicode (@handrews)
1 parent 8552177 commit f7775a6

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

jsonschema-core.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,26 @@ identifiers](#w3cwd-fragid-best-practices-20121025), plain name fragment
337337
identifiers in `application/schema+json` are reserved for referencing locally
338338
named schemas.
339339

340-
Plain name fragments MUST start with a letter ([A-Za-z]) or underscore ("\_"),
341-
followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores
342-
("\_"), and periods ("."). This matches the US-ASCII part of XML's [NCName
343-
production](#xml-names), which allows for compatibility with the recommended
344-
plain name [syntax](#w3crec-xptr-framework-20030325) for XML-based media types.
340+
Plain name fragments MUST follow XML's [NCName production](#xml-names), which
341+
allows for compatibility with the recommended plain name
342+
[syntax](#W3C.REC-xptr-framework-20030325) for XML-based media types. For
343+
convenience, the `NCName`` syntax is reproduced here in ABNF form, using
344+
a minimal set of rules: [^20]
345+
346+
[^20] Note that the previous syntax for plain name fragment is a subset of this syntax, which used only the first line of each of the `NCNameStartChar`` and `NCNameChar`` rules.
347+
348+
```abnf
349+
NCName = NCNameStartChar *NCNameChar
350+
NCNameStartChar = "_" / ALPHA
351+
/ %xC0-D6 / %xD8-F6 / %xF8-2FF
352+
/ %x370-37D / %x37F-1FFF
353+
/ %x200C-200D / %x2070-218F
354+
/ %x2C00-2FEF / %x3001-D7FF
355+
/ %xF900-FDCF / %xFDF0-FFFD
356+
/ %x10000-EFFFF
357+
NCNameChar = NCNameStartChar / "-" / "." / DIGIT
358+
/ %xB7 / %x0300-036F / %x203F-2040
359+
```
345360

346361
All fragment identifiers that do not match the JSON Pointer syntax MUST be
347362
interpreted as plain name fragment identifiers.

0 commit comments

Comments
 (0)