Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit de65b76

Browse files
Merge pull request #1430 from json-schema-org/handrews/iri-anchors
Plain name IRI fragments can use unicode (markdown version)
2 parents 8552177 + 4df2e4d commit de65b76

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

‎jsonschema-core.md‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,24 @@ 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](#w3crec-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:
345+
346+
```abnf
347+
NCName = NCNameStartChar *NCNameChar
348+
NCNameStartChar = "_" / ALPHA
349+
/ %xC0-D6 / %xD8-F6 / %xF8-2FF
350+
/ %x370-37D / %x37F-1FFF
351+
/ %x200C-200D / %x2070-218F
352+
/ %x2C00-2FEF / %x3001-D7FF
353+
/ %xF900-FDCF / %xFDF0-FFFD
354+
/ %x10000-EFFFF
355+
NCNameChar = NCNameStartChar / "-" / "." / DIGIT
356+
/ %xB7 / %x0300-036F / %x203F-2040
357+
```
345358

346359
All fragment identifiers that do not match the JSON Pointer syntax MUST be
347360
interpreted as plain name fragment identifiers.
@@ -3286,7 +3299,7 @@ to the document.
32863299

32873300
### draft-bhutton-json-schema-next
32883301
- `contains` now applies to objects as well as arrays
3289-
- Use IRIs instead of URIs
3302+
- Use IRIs instead of URIs, including allowing unicode in plain-name fragments
32903303
- Clarify that detecting duplicate IRIs for different schemas SHOULD raise an error
32913304
- Consolidate and clarify the syntax and rationale for plain-name fragments
32923305
- "$id" MUST be an absolute-IRI, without any fragment, even an empty one

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /