我正在尝试在 SVG 中正确实现 foreignObject 标记的 switch 标记,以便 Internet Explorer 可以显示其他内容(IE 中没有新内容,总是忽略功能)。该文档几乎完全清楚地说明了如何执行此操作:
<switch>
<!-- Process the embedded XHTML if the requiredExtensions attribute
evaluates to true (i.e., the user agent supports XHTML
embedded within SVG). -->
<foreignObject width="100" height="50"
requiredExtensions="http://example.com/SVGExtensions/EmbeddedXHTML">
<!-- XHTML content goes here -->
<body xmlns="http://www.w3.org/1999/xhtml">
<p>Here is a paragraph that requires word wrap</p>
</body>
</foreignObject>
<!-- Else, process the following alternate SVG.
Note that there are no testing attributes on the 'text' element.
If no testing attributes are provided, it is as if there
were testing attributes and they evaluated to true.-->
<text font-size="10" font-family="Verdana">
<tspan x="10" y="10">Here is a paragraph that</tspan>
<tspan x="10" y="20">requires word wrap.</tspan>
</text>
该示例很好且清晰,并展示了如何使用 requiredExtensions 属性。但是,超链接“http://example.com/SVGExtensions/EmbeddedXHTML”对我来说毫无意义。为了表明 XHTML 是这个 foreignObject 的 requiredExtension,我必须用什么来代替它?