mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
tweak the upgrade logic so that we don't loose existing attributes - allows upgrading a partially compliant xml
This commit is contained in:
parent
16ee468c78
commit
61940db92f
@ -60,16 +60,8 @@ def fixup_pointsym(sym):
|
||||
sym.attrib.pop('type')
|
||||
|
||||
def fixup_sym_attributes(sym):
|
||||
#if not sym.find('CssParameter'):
|
||||
# return
|
||||
attrib = {}
|
||||
metawriter = sym.attrib.get('meta-writer')
|
||||
if metawriter:
|
||||
attrib['meta-writer'] = metawriter
|
||||
metaoutput = sym.attrib.get('meta-output')
|
||||
if metaoutput:
|
||||
attrib['meta-output'] = metaoutput
|
||||
|
||||
# copy, so we don't loose after clear()
|
||||
attrib = dict(sym.attrib)
|
||||
for css in sym.findall('CssParameter'):
|
||||
key = css.attrib.get('name')
|
||||
value = css.text
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user