Take the 2-minute tour ×  Feel free to ask for more context if
you're wondering why this is necessary, or want to suggest a
better way to solve the bigger problem. (It involves laying out
a bunch of building floor plans onto a campus map and finding
the absolute location of certain things that are in those
building maps; more detail was bogging the question down.)  The
short version is that I want to take an SVG file that has <image
xlink:href="something.svg" /> references and merge it into one
big file with each referenced SVG being embedded with an <svg>
and inline SVG XML content.  So, my top-level source file
(composed in Inkscape) looks like this:  <image
xlink:href="floorplans/bldg1.svg" width="165.52684"
height="107.10559" y="-1937.7657" x="2507.1565"
transform="matrix(0,1,-1,0,0,0)" />  And my attempt at a merged
version to inline all the vector data:  <svg x="2507.1565"
y="-1937.7657" width="165.52684" height="107.10559"
transform="matrix(0,1,-1,0,0,0)" viewBox="0 0 1224 792"> <g
id="surface0"> <path