Opened 14 years ago
Closed 12 years ago
#5534 closed defect (fixed)
Preset schema was weakened - delete_if_empty for check is no longer boolean
Reported by: | AlfonZ | Owned by: | ce |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Internal preset | Version: | |
Keywords: | Cc: | jttt |
Description (last modified by )
Add attached preset-wrongcheck.xml as new tagging presets, click OK.
No error. Should complain cvc-datatype-valid.1.2.1: 'FOOBAR' is not a valid value for 'boolean'. (at line 7, column 79).
Presumably caused by r3582.
Attachments (1)
Change History (5)
by , 14 years ago
Attachment: | preset-wrongcheck.xml added |
---|
comment:1 by , 14 years ago
I've removed it because it's not supported for Checks (and it looks like it never was, it was an error in original schema file).
Problem with current tagging-preset file format is that it supports attributes like text.de which can't be checked by xsd so for every element are allowed all attributes (except for some common errors that are listed as use="forbidden"). delete_if_empty on check is not listed as forbidden so it's silently ignored.
It would be possible to have two schemas for tagging preset - the current one + new xsd friendly schema that will replace localized attributes with nested elements. So for example
<link href="http://wiki.openstreetmap.org/wiki/Tag:highway=motorway" de.href="http://wiki.openstreetmap.org/wiki/DE:Tag:highway=motorway" />
would become
<link href="http://wiki.openstreetmap.org/wiki/Tag:highway=motorway"> <href lang="de" value="http://wiki.openstreetmap.org/wiki/DE:Tag:highway=motorway"/> </link>
Not a big deal to implement this, but I'm just not sure it's worth the trouble...
follow-up: 3 comment:2 by , 14 years ago
I was playing a bit with delete_if_empty (in Text/Combo/Check) and found out, that it is completely not used now. What I mean is, try following steps:
- create way, apply Highways/Street/Primary - ref=R1, layer=1
- on the same way apply Highways/Street/Bridge - clear layer
layer tag remains 1
With JOSM 3514, layer tag will be cleared, and depending on delete_if_empty in preset it will be left empty (delete_if_empty=false) or will be removed (delete_if_empty=true). Behaviour presumably changed by r3518.
Similar steps with Check (e.g. setting bridge in Primary as unset) behave the same, except the bridge tag was always removed because delete_if_empty is not taken into account, as jttt mentioned.
Does this require another ticket?
comment:4 by , 12 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
delete_if_empty
has been dropped in r5155.
Preset with deliberate error