Opened 7 years ago

Closed 7 years ago

#55866 closed defect (fixed)

Entities and includes not processed in mapnik XML stylesheets

Reported by: bpanulla (Brian Panulla) Owned by: macports@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: stromnov (Andrey Stromnov)
Port: mapnik

Description

The current mapnik port version is not properly linking to the full libxml2 library, preventing it from handling XML entities or includes in stylesheets. What's surprising is that there is *some* XML support available, just not the advanced features. This used to work with version 2 of Mapnik in MacPorts.

I've attached some sample XML stylesheets that run properly on a Ubuntu 16.4 box with Mapnik 3.0.9. The examples require the current Mapnik 3 python bindings, which don't appear to install with the port. I installed them from GitHub (https://github.com/mapnik/python-mapnik/tree/v3.0.x)

Install the Python bindings and execute run.py. The script should generate three world maps that match the image files included in the tarball in the "expected" directory.

Attachments (2)

mapnik-xml-bug.tgz (412.7 KB) - added by bpanulla (Brian Panulla) 7 years ago.
python script and XML map files to reproduce the problem.
libxml2.patch (1.3 KB) - added by bpanulla (Brian Panulla) 7 years ago.
Patch to re-activate libxml2 support in a variant.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by bpanulla (Brian Panulla)

Attachment: mapnik-xml-bug.tgz added

python script and XML map files to reproduce the problem.

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: stromnov added
Owner: set to macports@…
Status: newassigned

In the future, please Cc the port maintainers (port info --maintainers mapnik), if any.

comment:2 Changed 7 years ago by bpanulla (Brian Panulla)

I located this upstream issue, which seems to indicate a change in default behavior for Mapnik preferring boost::property_tree as an XML parser: https://github.com/mapnik/mapnik/issues/3191

Seems like this calls for a new variant if we can get it to override the default.

Last edited 7 years ago by bpanulla (Brian Panulla) (previous) (diff)

Changed 7 years ago by bpanulla (Brian Panulla)

Attachment: libxml2.patch added

Patch to re-activate libxml2 support in a variant.

comment:3 Changed 7 years ago by bpanulla (Brian Panulla)

Looks like we were missing XMLPARSER=libxml2 as described here: https://github.com/mapnik/mapnik/wiki/ManagingLargeXmlFiles

Patch attached adds a libxml2 variant that works with XML entities and includes.

comment:4 Changed 7 years ago by stromnov (Andrey Stromnov)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.