[Content_Types] .xml的用途 [英] Purpose of [Content_Types].xml

查看:926
本文介绍了[Content_Types] .xml的用途的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我有开包装公约 - 相关问题。任何人都可以解释定义内容类型的目的,而内容类型可以从关系中确定吗?谢谢。
* fero

Hello,
I have Open Packaging Conventions - related question. Can anyone explain purpose of defining content types, while content type can be determined from relationships? Thanks.
*fero

推荐答案

此部分存储包中所有其他部分的所有内容类型。内容类型向消费者表明包装中可以预期的内容类型。你必须注意两件事:1。 Open XML应用程序必须通过验证零件流的内容是否与预期的内容类型匹配来强制执行内容类型。部件与内容类型清单不对应的文档被视为损坏。添加新部件时,请记住更新内容类型列表。如果忘记,文档将无法打开,并显示非描述性错误。但是您不必担心这一点,因为SDK将负责v1或v2。
this part stores all the content types for all the other parts inside the packages. the content type indicates to the consumer what type of content can be expected in the package.
two things you have to pay attention to:
1.  Open XML applications must enforce content types by verifying that the contents of the part stream match the expected content type. A document whose parts do not correspond to the content types manifest is considered corrupt.
2. when you add new parts, remember to update the content-types list. If you forget, the document will fail to open and a non-descriptive error is displayed. but you don't have to worry about this, coz SDK will take care of this, either v1 or v2.


这篇关于[Content_Types] .xml的用途的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆