SVG image tag not working
You got the namespaces wrong.
change
xmlns="localhost" xmlns:xlink= "localhost/svgtest"
to
xmlns="http://www.w3.org/2000/svg" xmlns:xlink= "http://www.w3.org/1999/xlink"
Maybe you should have a look at this Namespaces Crash Course by MDN.