I take the svg file from Melanie and run it through a short set of grep search and replaces as specified in the file Prepare_SVG_for_upload_to_PostGres.txt. The result is to insert a desc element into those elements which need one (all but street labels).
Here's an example record incoming from Melanie (note the path element is self-closing):
<path
style="opacity:0.5;fill:none;fill-rule:evenodd;stroke:#008888;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 8718.519,3000.9999 L 8674.0746,2699.0318 L 8657.7783,2697.2962 L 8651.8523,2645.4444 L 8594.8717,2571.9154 L 8561.8476,2472.6831 L 8467.06,2477.9815 L 8370.5773,2318.2205 L 8269.6301,2350.1211 L 8173.8635,2219.9881 L 7955.9655,2296.7231 L 8016.1109,2460.9038 L 8032.5142,2601.1576 L 8025.1339,2679.298 L 7915.154,2684.3124 L 7924.0838,2748.0929 L 7925.2283,2808.3062 L 7937.8856,2870.4277 L 8001.6928,2916.6779 L 8108.4386,3023.0907 L 8718.519,3000.9999 z "
id="TOWE4" inkscape:label="Tower Street Ward" sodipodi:nodetypes="ccccccccccccccccccccc" />
Here's the same record after processing through the rules below. This is what needs to be uploaded into the eXist db:
<path
style="opacity:0.5;fill:none;fill-rule:evenodd;stroke:#008888;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 8718.519,3000.9999 L 8674.0746,2699.0318 L 8657.7783,2697.2962 L 8651.8523,2645.4444 L 8594.8717,2571.9154 L 8561.8476,2472.6831 L 8467.06,2477.9815 L 8370.5773,2318.2205 L 8269.6301,2350.1211 L 8173.8635,2219.9881 L 7955.9655,2296.7231 L 8016.1109,2460.9038 L 8032.5142,2601.1576 L 8025.1339,2679.298 L 7915.154,2684.3124 L 7924.0838,2748.0929 L 7925.2283,2808.3062 L 7937.8856,2870.4277 L 8001.6928,2916.6779 L 8108.4386,3023.0907 L 8718.519,3000.9999 z "
id="TOWE4" inkscape:label="Tower Street Ward" sodipodi:nodetypes="ccccccccccccccccccccc">
<desc id="descTOWE4">
<a target="_top" href="http://mapoflondon.uvic.ca/render_page.php?id=TOWE4" id="aTOWE4">_View the article on Tower Street Ward.</a>
</desc>
</path>