修复 Word 到 XML 转换中的超链接问题

发布于 2025-01-03 14:31:02 字数 452 浏览 7 评论 0原文

我们使用两阶段过程将客户的 Word 文档转换为 XML。第一阶段使用 upCast 创建 XML 文件,然后运行自定义 XSLT 将输出转换为客户端的 DTD。此过程已在数千个文件上成功运行。

我现在有一些文件(源文档和该文档的翻译),其中脚注无法正确链接。脚注是对文档末尾编号列表的上标交叉引用。在验证过程中,我得到以下信息:

SXXP0003: Error reported by XML parser: An element with the identifier
"d878e2235" must appear in the document.

交叉引用指向该标识符,但底部的编号项没有它。我尝试替换交叉引用并替换整个编号列表;错误仍然存​​在。我认为这是代码的问题,除了引用相同版本的其他文档(即最初可能是在同一版本的 Word 中创建的,可能是 2003 年)工作正常。我该如何解决这个问题?

We use a two stage process to convert a client's Word documents to XML. The first stage uses upCast to create XML files, then a custom XSLT is run to convert the output to the client's DTD. This process has run successfully on thousands of files.

I've got a few files now (a source document and translations of that document) in which footnotes will not link properly. The footnotes are superscript cross-references to a numbered list at the end of the document. During validation, I get this:

SXXP0003: Error reported by XML parser: An element with the identifier
"d878e2235" must appear in the document.

The cross-reference is pointing to that identifier, but the numbered item at the bottom does not have it. I've tried replacing the cross-reference and replacing the entire numbered list; the error persists. I'd think it was a problem with the code, except that other documents with references of the same vintage (i.e., likely originally created in the same version of Word, which is likely 2003) work fine. How can I fix this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不弃不离 2025-01-10 14:31:02

问题是文档的较旧版本(包含 1996 年的版权日期)中有一个文本框,该文本框在参考表下方不可见,因此干扰了该部分中的文档样式和超链接。我一直关注导致错误的 xml 部分,而没有查看上下文。

The problem was that there was a text box from a much older version of the document (containing a copyright date of 1996) that was not visible and underneath the references table, therefore interfering with the document styles and hyperlinks in that section. I'd been focusing on the section of the xml that was causing the error and hadn't looked at the context.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文