artemp/tickets2issues — Issue #410: Interpret all relative file paths in XML as relative to the XML file location
Author: artemp
Created: 2011-10-11 15:15:57+00:00
State: open
Labels: XML

This will allow easier bundling of data with XML mapfiles.

Currently any relative paths found in the XML file for datasources or symbols are interpreted relative to the script process loading the XML (which is often variable or unpredictable).

The attached patch switches this behavior to ensure that relative path be relative to the XML location, while providing an optional level parameter for optionally maintaining the earlier behavior by setting it to "false":

{{{

}}}

Therefore the new behavior introduced by the patch will be in effect if 'paths_from_xml="true"' or if this option is not provided.

Tests are included with the patch based on the new testing framework Beau has added. Just run them with

{{{
$ nosetests
}}}
* you should get no errors from the 'good_maps' folder of tests. (currently trunk - r1110 - has 5 python_tests failures).

This ticket is a replacement for #147