Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/schema_salad/metaschema/ident_res.yml @ 1:56ad4e20f292 draft
"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author | guerler |
---|---|
date | Fri, 31 Jul 2020 00:32:28 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:d30785e31577 | 1:56ad4e20f292 |
---|---|
1 - | | |
2 ## Identifier resolution | |
3 | |
4 The schema may designate one or more fields as identifier fields to identify | |
5 specific objects. Processing must resolve relative identifiers to absolute | |
6 identifiers using the following rules: | |
7 | |
8 * If an identifier URI begins with `#` it is a current document | |
9 fragment identifier. It is resolved relative to the base URI by | |
10 setting or replacing the fragment portion of the base URI. | |
11 | |
12 * If an identifier URI contains `#` in some other position is a | |
13 relative URI with fragment identifier. It is resolved relative | |
14 to the base URI by stripping the last path segment from the base | |
15 URI and adding the identifier followed by the fragment. | |
16 | |
17 * If an identifier URI does not contain a scheme and does not | |
18 contain `#` it is a parent relative fragment identifier. | |
19 | |
20 * If an identifier URI is a parent relative fragment identifier | |
21 and the base URI does not contain a document fragment, set the | |
22 document fragment on the base URI. | |
23 | |
24 * If an identifier URI is a parent relative fragment identifier | |
25 and the object containing this identifier is assigned to a | |
26 parent object field defined with `subscope` in | |
27 `jsonldPredicate`, append a slash `/` to the base URI fragment | |
28 followed by the value of the parent field `subscope`. Then | |
29 append the identifier as described in the next rule. | |
30 | |
31 * If an identifier URI is a parent relative fragment identifier | |
32 and the base URI contains a document fragment, append a slash | |
33 `/` to the fragment followed by the identifier field to the | |
34 fragment portion of the base URI. | |
35 | |
36 * If an identifier URI begins with a namespace prefix declared in | |
37 `$namespaces` followed by a colon `:`, the prefix and colon must be | |
38 replaced by the namespace declared in `$namespaces`. | |
39 | |
40 * If an identifier URI is an absolute URI consisting of a scheme and path, | |
41 no processing occurs. | |
42 | |
43 When preprocessing visits a node containing an identifier, that identifier | |
44 must be used as the base URI to process child nodes. | |
45 | |
46 It is an error for more than one object in a document to have the same | |
47 absolute URI. | |
48 | |
49 ### Identifier resolution example | |
50 | |
51 Given the following schema: | |
52 | |
53 ``` | |
54 - $include: ident_res_schema.yml | |
55 - | | |
56 ``` | |
57 | |
58 Process the following example: | |
59 | |
60 ``` | |
61 - $include: ident_res_src.yml | |
62 - | | |
63 ``` | |
64 | |
65 This becomes: | |
66 | |
67 ``` | |
68 - $include: ident_res_proc.yml | |
69 - | | |
70 ``` |