Commit 1902342
committed
feat: improved URI pattern rewrite implementation in source files
Conform to the following scheme:
```
ns:{notice-id}-{notice-ver}/Notice/{class-or-context-name}/{id-or-path-seed}
```
Implemented with the following techniques:
**rr:template:**
- substitute `http://data.europa.eu/a4g/resource/id_{` with `http://data.europa.eu/a4g/resource/{`
- substitute `replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-')}` with `replace(replace(/*/cbc:ID, ' ', '-' ), '/' , '-')}-{/*/cbc:VersionID}`
- substitute `\}_(.*?)_\{` with `}/$1/{`
- substitute `}_Notice` with `}/Notice`
**rml:reference:**
- substitute `'http://data.europa.eu/a4g/resource/id_'` with `'http://data.europa.eu/a4g/resource/'`
- substitute `replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') ||` with `replace(replace(/*/cbc:ID[@schemeName='notice-id'], ' ', '-' ), '/' , '-') || '-' || /*/cbc:VersionID ||`
- substitute `\|\| '_(.*?)_' \|\|` with `|| '/$1/' ||`
- substitute `|| '_Notice'` with `|| '/Notice'`
**Unwanted:**
- substitute `replace(replace(cbc:ID, ' ', '-' ), '/' , '-')}` with `replace(replace(cbc:ID, ' ', '-' ), '/' , '-')}-{/*/cbc:VersionID}`
- substitute `replace(replace(cbc:ID, ' ', '-' ), '/' , '-') ||` with `replace(replace(cbc:ID, ' ', '-' ), '/' , '-') || '-' || /*/cbc:VersionID ||`
We don't want to be replacing references to previous/external entities.
Those will be manually replaced as they need extra care.1 parent 5f36eca commit 1902342
96 files changed
Lines changed: 1082 additions & 1036 deletions
File tree
- src
- mappings-can
- mappings-pin
- mappings-versioned
- mappings
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
0 commit comments