Case 1: without xml:base
Works in IE (Edge), Chrome, but not in Firefox.
<html> <head> <base href="http://my/server/basedir"> </head> <body> <svg width="300" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g> <path d="M100,100 L150,150" id="path"/> <text> <textpath xlink:href="#path">Hello</textpath> </text> </g> </svg> </body> </html>
Case 2: with xml:base
Works in IE (Edge), Chrome, Firefox.
If this URL is http://my/thisfile.htm , then set xml:base="http://my/thisfile.htm" to the svg tag or textpath tag.
<html> <head> <base href="http://my/server/basedir"> </head> <body> <svg width="300" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:base="http://my/thisfile.htm"> <g> <path d="M100,100 L150,150" id="path"/> <text> <textpath xlink:href="#path">Hello</textpath> </text> </g> </svg> </body> </html>
source share