altChunk 在PresentationML 中有效吗?
在 pptx ooxml 包内的任何幻灯片 xml 文件中使用 altChunk 元素是否有效?
我已通读 ECMA-376 规范,虽然 altChunk 是在规范的 WordprocessingML 部分中定义的(例如:“允许 ap 元素的任何文档部分也可以包含 altChunk 元素,其 id 属性引用关系”),其他地方没有提到这一点。
PresentationML 显然没有 ap 元素,以及 AltChunk 的其他有效父元素(body (§17.2.2);comment (§17.13.4.2);docPartBody (§17.12.6);endnote (§17.11.2);脚注(§17.11.10);ftr(§17.10.3);hdr(§17.10.4); tc (§17.4.66)) 在PresentationML 中似乎无效。
我尝试在幻灯片 xml 文件中使用 altChunk(在相关的 rels 文件中具有正确验证的条目)导致无效的 xml:PPT2010 提供修复文件,并且这个很棒的工具 http://www.probatron.org:8080/officeotron/officeotron.html 提供了一些不同的错误(例如:“发现以元素‘p:altChunk’开头的无效内容。”或“预期为‘{"http://schemas.openxmlformats.org/drawingml/2006/main":p}’之一") 取决于我放置 altChunk 元素的位置。
(FWIW,我试图解决的实际问题是在 ppt 幻灯片中包含一些基本的 HTML。)
Is it valid to use an altChunk element within a any of the slide xml files within a pptx ooxml package?
I have read through the ECMA-376 spec, and while altChunk is defined within the WordprocessingML section of the spec (e.g.: "Any document part that permits a p element can also contain an altChunk element, whose id attribute refers to a relationship"), it is not mentioned anywhere else.
PresentationML apparently doesn't have a p element, and the other valid parent elements for AltChunk (body (§17.2.2); comment (§17.13.4.2); docPartBody (§17.12.6); endnote (§17.11.2); footnote (§17.11.10); ftr (§17.10.3); hdr (§17.10.4); tc (§17.4.66)) don't appear to be valid within PresentationML.
My attempts to use altChunk within a slide xml file (with proper validated entries in the relevant rels file) have resulted in invalid xml: PPT2010 offers to repair the file, and this great tool http://www.probatron.org:8080/officeotron/officeotron.html offers a number of different errors (e.g.: "Invalid content was found starting with element 'p:altChunk'." or "One of '{"http://schemas.openxmlformats.org/drawingml/2006/main":p}' is expected") depending on where I place the altChunk element.
(FWIW, the actual problem I am trying to solve is to include some basic HTML within a ppt slide.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您希望通过在幻灯片中包含 HTML 来实现什么目的?
如果您只需要存储它(或任何其他文本),您可以使用标签。我不知道它们是如何在 XML 中实现的,但您可以通过一些 VBA 添加一个标签,然后查看 XML 中出现的内容:
您可以向演示对象、幻灯片对象和形状对象添加任意数量的标签,除其他外。标签没有 UI,因此用户看不到它们。
What do you want to accomplish by including the HTML within a slide?
If you simply need to store it (or any other text) you can use Tags. I don't know how they're implemented in XML but you can add one via a bit of VBA and see what appears in the XML:
You can add as many tags as you like to the Presentation object, Slide objects, and Shape objects, among other things. There's no UI for tags, so they're not visible to users.