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
This ticket is a replacement for #147
[migurski] I agree, this behavior would be vastly preferable.
[mishok13] This feature would be extremely nice to have.
[springmeyer] great, thanks for the feedback.
applied in r1124
[springmeyer] Need to look into handling this within each xml parser as it appears (duh) that libxml may offer built in support for this that will allow this to work when loading xml from a string as well (see #440):
[springmeyer] nope, appears only that libxml2 offers a way to set the 'url' (aka base_path) from reading from a string.