- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试让 XPointer URI 在 SVG 文件中工作,但到目前为止还没有成功。在尝试了一些更复杂但失败的事情之后,我将其简化为只引用一个 ID。然而,这仍然失败。
规范似乎很清楚这个实现:
http://www.w3.org/TR/SVG/struct.html#URIReference
我在网上找到了一个示例,说明在 svg 文档中应该是有效的 XPointer 引用。这是 Original .这是我复制出来的版本:
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="500" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <rect id="simpleRect" width="100px" height="75px"/> </defs> <use xlink:href="#simpleRect" x="50" y="50" style="fill:red"/> <use xlink:href="#xpointer(id('simpleRect'))" x="250" y="50" style="fill:yellow"/></svg>
这应该显示两个矩形...一个红色和一个黄色。我尝试使用 Firefox 3.6 和 Inkscape 0.47 进行渲染。没有成功。仅显示红色矩形。
我错过了什么?
感谢您提供的任何帮助
最佳答案
目前(截至 2016 年 3 月 10 日,SVG 1.1 第二版)不支持在浏览器中渲染 XPointers。 W3Schools writes about this as follows :
XPointer Browser Support
There is no browser support for XPointer. But XPointer is used in other XML languages.
这有点令人沮丧,因为所有官方文档都懒得区分 SVG 的浏览器支持(Internet 就绪)功能和 SVG 的技术支持的纯 XML 类功能。
关于svg - SVG 中的 XPointer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2485999/
是否有任何支持 XPointer 和 xpointer() 方案的 java 库? Xerces 通过 XPointer Framework 和 XPointer 支持 XIncludeelement
在XLink和 XPointer 语法 章节,我们讲到可以在 xlink:href 属性中把 XPointer 部分添加到 URL 后面,这样就可以导航到文档中某个具体的位置 现在,让我们通过一个范
XLink 标准定义了如何在 XML 文档中创建超级链接 学会 XLink 和 XPointer 不能帮你找到工作,不过可以提高你的技术见解 XPointer 则允许这些超级链接指向 X
XLink 标准定义了如何在 XML 文档中创建超级链接 XPointer 则允许这些超级链接指向 XML 文档中的更多具体部分 您应当具备的基础知识 在继续学习之前,我们希望你对以下知识点有基
在HTML 中,我们知道 <a> 元素可定义超级链接, 而且,几乎只有 <a>标签可以定义连接。 但,在XML 不是这样工作的。 在XML 文档中,您可以使用任何你需要的元
我一直在尝试让 XPointer URI 在 SVG 文件中工作,但到目前为止还没有成功。在尝试了一些更复杂但失败的事情之后,我将其简化为只引用一个 ID。然而,这仍然失败。 规范似乎很清楚这个实现:
XLink、XPointer 和 XInclude 有什么区别? 太乱了。有人可以解释一下区别吗? 最佳答案 简答: XLink 和 XPointer 非常相似,因为它们提供了一种引用其他元素的方法,
我想合并 2 个具有相同结构的 XML 文件来制作一个。例如; Test1.xml
XPath、XQuery 和XPointer 有什么区别?据我所知,XQuery 是XPath 的扩展版本。我对 XPath 有一些基本了解。是否有 XPath 中可用而 XQuery 中没有的功能?
此处 XInclude/XPointer 的令人沮丧的问题。 目的是将 XML 格式的价格条目列表中的条目包含到另一个文档中。我有一个包含价格列表的文档,如下所示: ]>
很抱歉,如果之前有人问过这个问题,我什至不确定要搜索什么才能提出这个问题。 当我创建一个 typedef struct 时,我通常会这样做: typedef struct myStruct { i
我有一个包含 2 个“sub_x.xml”文件的“main.xml”文件。包含行使用“xpointer”仅指向/包含包含 xml 的特定标记。当我使用 ElementTree 来确定它是否正常工作时,
我是一名优秀的程序员,十分优秀!