Opened 3 weeks ago
Last modified 3 weeks ago
#25008 new enhancement
Improve the tagging preset schema
| Reported by: | gaben | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 26.12 |
| Component: | Internal preset | Version: | |
| Keywords: | xsd tagging schema validation | Cc: | Famlam, simonpoole, stoecker, skyper |
Description
I plan to add a new description to the XSD fields, as well as some extra validation, if possible (e.g. object types [node, way, relation]). While the schema is designed to be flexible, it is also error-prone. For almost 15 years, the fact that it contains unused parameters went unnoticed. Examples:
delete_if_emptywas removed in 2012 (r5155): https://github.com/JOSM/josm/blob/bdc651ba9185db66d751a9f81922a2a89ac486dc/resources/data/defaultpresets.xml#L3006-L3038values_i18n="false"never did anything? https://github.com/JOSM/josm/blob/bdc651ba9185db66d751a9f81922a2a89ac486dc/resources/data/defaultpresets.xml#L295- and more
More stringent validation enabled me to fix r19563, which had also gone unnoticed for some time.
The patch will follow soon, hopefully.
Attachments (1)
Change History (6)
follow-up: 3 comment:2 by , 3 weeks ago
values_i18n="false" has been introduced by r16474 and actually should be values_no_i18n="true" instead? See 12:ticket:17818
by , 3 weeks ago
| Attachment: | josm_25008_values_no_i18n.patch added |
|---|
replace wrong values_i18n="false" with correct values_no_i18n="true"
comment:4 by , 3 weeks ago
Replying to stoecker:
values_i18n="false" has been introduced by r16474 and actually should be values_no_i18n="true" instead? See 12:ticket:17818
Damn, my fault. Yes, should be values_no_i18n="true". patch attached. Hope it is correct.



Problem is the I18n tags which prevent the checks for unused values.
Also preventing unused values makes new values impossible due to backwards compatibilty.
Stricter checks must be optional/warnings and XSD doesn't support that as far as I know.