Word 2010 自定义 XML?

发布于 2024-12-02 09:31:25 字数 235 浏览 3 评论 0原文

我正在研究一个新项目,其中涉及使用自定义 XML 将 XML 结构添加到 Word 文档,但我不知道 i4i 情况如何影响这一点。

1)微软在文档中建议使用自定义控件。可以使用 XML 架构文件进行验证吗?在我看来,它更像是一种创建模板的方法,而不是真正为现有内容添加标签的方法。

2) i4i对Custom XML的判断仅涉及北美。 Microsoft 是否在全球范围内删除了该功能,或者我仍然可以在澳大利亚访问它吗?

I am looking into a new project which involves adding XML structure to a Word document using Custom XML but I don't know how the i4i case affects this.

1) Microsoft recommends using custom controls in the document. Can this validate using an XML Schema file? It looks to me more like a way to create a template and not really for adding tags to existing content.

2) The i4i judgement about Custom XML only concerned North America. Did Microsoft remove the feature worldwide or can I still access it in Australia?

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

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

发布评论

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

评论(2

俯瞰星空 2024-12-09 09:31:25

还有一些替代方法,我在我的博客 Windward Wrocks(我的博客中的链接和更好的格式):

Word 的自定义 XML 和 i4i 专利案例 Windward Reports 从未
使用自定义 XML(或书签)进行标记。 (我们都看了,但是
每种方法都有一些问题,有时会带来问题。)但是我们
请在 Word、Excel 和 & 中使用标记PowerPoint 作为我们的报表设计器。我们
确实有一个非常强大的 Office AddIn 来支持此标记。所以我
我认为我对这一问题的理解和其他人一样好
可以并且仍然是一个无私的一方。

我不会对此案发表意见,只是说我希望他们
本来可以达成协议。这件事上最大的输家是所有人
谁使用自定义 XML 进行标记,因为现在已删除。 (并且到
对所有软件专利说痘。)

首先对于需要调整的程序员来说,有一个产品来自
i4i 对此进行了破解,称为 x4w。然而,我不认为那是
您的最佳解决方案(如下所述)。我的建议是切换到
使用内容控件、字段、位图和/或纯旧文本。这
其中前三种方法比自定义 XML 更健壮,并且
仍然受 Word 支持。我们使用所有四种方法(用户
选择)并且它们坚如磐石。

如果您的 Word 文档中有自定义 XML,您该怎么办?如果
你不使用自定义XML,那么没有问题,只需打开
文件和 Word 会将其删除,留下其余的内容
文档。如果您的使用可以切换到使用其他功能,则同样如此。
您将失去现有的标记,但可以继续。

如果您需要查找其中包含自定义 XML 的任何文件,请执行此操作
Microsoft 的程序将完成这项工作(仅限 DOCX/DOCM)。还有,这个
限制仅适用于 11 日或之后销售的 Word 2007
今年 1 月 – 以及 Word 2010 的所有副本。微软有一个很好的
这里总结一下。

如果您必须使用自定义 XML,目前您唯一的选择是 x4w。
但是,我强烈建议您仅将其用作权宜之计
当您找到自定义 XML 的替代方案时进行衡量。因为你可以
发现Word的下一个service pack会导致x4w无法保存
您的自定义 XML。由于 Microsoft 和 i4i 之间没有失去爱,所以我
在下一个服务包中看到它不会感到惊讶:

1.Word 不再支持自定义 XML。目前它取消了定制
XML 输出,但当它重新插入时,Word 仍然具有
显示和使用它的功能。但如果不支持自定义 XML
如果允许,他们就可以从 Word 中删除该功能。 2.单词
在保存和加载文档时删除自定义 XML。如果这个
发生 i4i 也可以尝试解决这个问题,但这比
难题。对于黑客失败的情况,你不会知道
直到您下次打开该文件时,您的所有工作都会丢失。
3.Word 在加载过程中的哪个点发生变化并剥离
输出自定义 XML。它目前发生在打开文档事件之前
(我假设是 x4w 将自定义 XML 重新插入时)。但词
可以在该事件之后立即将其删除 - 然后这是一个很大的事情
更难恢复自定义 XML。

There are alternative approaches and which I covered in my blog Windward Wrocks (links and better formatting at my blog):

Custom XML for Word and the i4i patent case Windward Reports never
used Custom XML (or bookmarks) for tagging. (We looked at both but
each approach has issues that make them problematic at times.) But we
do use tagging in Word, Excel, & PowerPoint as our report designer. We
do have a very powerful Office AddIn to support this tagging. So I
think I have as good an understanding of the issues around this as one
can have and yet still be a disinterested party.

I'm not going to give an opinion on the case except to say I wish they
could have reached an agreement. The big losers on this are everyone
who made use of Custom XML for tagging as this is now removed. (And to
say a pox on all software patents.)

First for the programmers who have to adjust, there is a product from
i4i that hacks around this called x4w. However, I don't think that is
your best solution (explained below). My suggestion is to switch to
using content controls, fields, bitmaps, and/or plain old text. The
first three of these approaches are more robust than custom XML and
are still supported by Word. We use all four approaches (user
selected) and they are rock solid.

So what do you do if you have custom XML in your Word documents? If
you don't use the custom XML, then there's no problem, just open the
files and Word will strip it out, leaving you the rest of the
document. Same if your use can be switched to using another feature.
You will lose your existing markers but otherwise can continue.

If you need to find any files that have custom XML in them, this
program for Microsoft will do the job (DOCX/DOCM only). Also, this
restriction only comes in to play for Word 2007 sold on or after 11
January this year – and all copies of Word 2010. Microsoft has a good
summation here.

If you must have the custom XML, your only option at present is x4w.
However, I strongly recommend that you only use this as a stop-gap
measure as you find an alternative to custom XML. Because you could
find that the next service pack of Word will render x4w unable to save
your custom XML. As there is no love lost between Microsoft and i4i, I
would not be surprised to see in the next service pack:

1.Word drops support for custom XML. At present it strips the custom
XML out but when it is inserted back in, Word still has the
functionality to display and use it. But if custom XML support is not
allowed, they can then remove that functionality from Word. 2.Word
strips custom XML on saving as well as on loading a document. If this
occurs i4i can try to hack around this too, but this is a much more
difficult problem. And for cases that the hack fails, you won't know
until the next time you open the file – and all your work is lost.
3.Word changes at what point during the load process that it strips
out the custom XML. It presently occurs before the open document event
(which I assume is when x4w inserts the custom XML back in). But Word
could strip it out right after that event – and it is then a much
harder hack to get the custom XML back in.

遇到 2024-12-09 09:31:25

关于2),从技术上讲,这是合法的,但微软认为不值得付出额外的努力,我也不会。

On 2), technically it would be legal, but MS did not consider it worth the additional effort, and nor would I.

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