1

Mozilla Firefox は、SVG 要素に xml:base 属性が指定されている場合、SVG ドキュメント内の xlink:href 属性のローカル IRI 参照を認識しません。

同じ SVG ドキュメントが Google Chrome で正常に表示されます。

xml:base 属性を削除しようとすると、Firefox はローカル ID で要素を見つけます。

<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1"
    xml:base="http://samplehost.com" 
    xmlns:ev="http://www.w3.org/2001/xml-events" 
    xmlns:svg="http://www.w3.org/2000/svg" 
    xmlns:xlink="http://www.w3.org/1999/xlink" 
    xmlns="http://www.w3.org/2000/svg" 

    viewBox="0 0 236.00000 148.00000" 
    height="148.00000" 
    width="236.00000"
>

<def>
    <symbol id="86310c35-a7e1-47c0-90c8-b6f912d2cead" viewBox="0 0 113.39 70.87" enable-background="new 0 0 113.39 70.87">
      <path d="M56.618,57.678l-0.066-0.039c-0.624-0.369-1.254-0.715-1.873-1.029c-3.868-1.959-7.76-2.91-11.899-2.91   c-2.668,0-5.102,0.385-7.249,0.725c-1.515,0.24-2.946,0.467-4.255,0.527c-3.153,0.143-5.435-1.178-6.766-3.912l-0.201-0.414   l-0.448,0.1c-0.281,0.061-0.566,0.092-0.849,0.092c-2.174,0-3.944-1.769-3.944-3.943c0-0.186,0.014-0.377,0.042-0.568l0.074-0.518   l-0.507-0.129c-3.856-0.982-4.877-3.094-6.059-5.539c-0.781-1.615-1.589-3.287-3.267-4.67l-0.123-0.1l0.123-0.102   c1.677-1.383,2.485-3.054,3.267-4.669c1.183-2.444,2.204-4.556,6.059-5.539l0.507-0.129l-0.074-0.519   c-0.027-0.191-0.042-0.382-0.042-0.567c0-2.174,1.77-3.944,3.944-3.944c0.283,0,0.568,0.031,0.849,0.092l0.448,0.099l0.201-0.413   c1.333-2.737,3.614-4.057,6.766-3.913c1.308,0.059,2.739,0.287,4.254,0.526c2.147,0.34,4.582,0.726,7.25,0.726   c4.139,0,8.031-0.952,11.899-2.911c0.619-0.314,1.249-0.66,1.873-1.028l0.066-0.04l0.067,0.04c0.624,0.368,1.253,0.714,1.873,1.028   c3.868,1.959,7.76,2.911,11.898,2.911c2.669,0,5.103-0.385,7.25-0.726c1.515-0.24,2.946-0.467,4.254-0.526   c0.154-0.007,0.309-0.01,0.459-0.01c2.919,0,5.04,1.32,6.307,3.923l0.202,0.413l0.448-0.099c0.28-0.062,0.564-0.092,0.849-0.092   c2.174,0,3.943,1.77,3.943,3.944c0,0.185-0.014,0.376-0.041,0.567l-0.074,0.519l0.507,0.129c3.855,0.983,4.876,3.093,6.059,5.539   c0.782,1.615,1.591,3.286,3.268,4.669l0.123,0.102l-0.123,0.1c-1.677,1.383-2.485,3.055-3.267,4.67   c-1.184,2.445-2.204,4.557-6.06,5.539l-0.507,0.129l0.074,0.518c0.027,0.191,0.041,0.383,0.041,0.568   c0,2.174-1.77,3.943-3.943,3.943c-0.283,0-0.568-0.031-0.849-0.092l-0.448-0.1l-0.202,0.414c-1.267,2.604-3.39,3.922-6.312,3.922   c-0.148,0-0.302-0.004-0.454-0.01c-1.308-0.061-2.739-0.287-4.255-0.527c-2.146-0.34-4.581-0.725-7.249-0.725   c-4.139,0-8.03,0.951-11.898,2.91c-0.62,0.314-1.249,0.66-1.873,1.029L56.618,57.678z M42.78,53.437   c4.181,0,8.112,0.961,12.017,2.939c0.603,0.305,1.215,0.641,1.822,0.996c0.607-0.355,1.22-0.691,1.822-0.996   c3.905-1.979,7.836-2.939,12.017-2.939c2.688,0,5.134,0.387,7.29,0.729c1.508,0.238,2.933,0.465,4.226,0.523   c0.148,0.006,0.298,0.01,0.442,0.01c2.813,0,4.857-1.27,6.077-3.775l0.291-0.598l0.649,0.143c0.262,0.057,0.529,0.086,0.793,0.086   c2.029,0,3.682-1.652,3.682-3.682c0-0.172-0.013-0.352-0.039-0.531l-0.107-0.75l0.735-0.188c3.737-0.953,4.734-3.014,5.888-5.398   c0.775-1.604,1.576-3.258,3.216-4.656c-1.64-1.399-2.44-3.054-3.216-4.658c-1.153-2.385-2.15-4.446-5.888-5.398l-0.735-0.187   l0.107-0.751c0.026-0.179,0.039-0.357,0.039-0.53c0-2.03-1.652-3.682-3.682-3.682c-0.265,0-0.531,0.029-0.793,0.086l-0.649,0.143   l-0.291-0.598c-1.283-2.635-3.481-3.905-6.52-3.765c-1.292,0.058-2.717,0.284-4.226,0.523c-2.156,0.342-4.601,0.729-7.289,0.729   c-4.182,0-8.113-0.961-12.017-2.939c-0.602-0.306-1.215-0.641-1.822-0.998c-0.607,0.357-1.219,0.692-1.821,0.998   c-3.905,1.977-7.835,2.939-12.017,2.939c-2.688,0-5.133-0.387-7.291-0.729c-1.507-0.239-2.932-0.465-4.225-0.523   c-3.041-0.141-5.236,1.129-6.519,3.765l-0.292,0.598l-0.649-0.143c-0.262-0.057-0.528-0.086-0.792-0.086   c-2.03,0-3.682,1.652-3.682,3.682c0,0.173,0.013,0.351,0.039,0.53l0.107,0.751l-0.735,0.187c-3.737,0.953-4.733,3.014-5.888,5.398   c-0.775,1.603-1.576,3.259-3.215,4.658c1.64,1.398,2.44,3.053,3.215,4.656c1.154,2.385,2.15,4.445,5.888,5.398l0.735,0.188   l-0.107,0.752c-0.025,0.178-0.039,0.355-0.039,0.529c0,2.029,1.652,3.682,3.682,3.682c0.264,0,0.53-0.029,0.792-0.086l0.649-0.143   l0.292,0.598c1.282,2.635,3.479,3.904,6.519,3.766c1.294-0.059,2.718-0.285,4.226-0.523C37.647,53.824,40.091,53.437,42.78,53.437z"/>
    </symbol>
</def>

<use xlink:href="#86310c35-a7e1-47c0-90c8-b6f912d2cead" x="0" y="0"/>
</svg>
4

0 に答える 0