Where can I find the XSDs of DOCX XML files?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 08:29:02

问题


I've created a docx file, unzipped it. Now I have:

  • _rels (folder)
  • docProps (folder)
  • word (folder)
  • [Content_Types].xml

The content of [Content_Types].xml is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
    <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
    <Default Extension="xml" ContentType="application/xml"/>
    <Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
    <Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
    <Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>
    <Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/>
    <Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>
    <Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>
    <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
    <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
</Types>

Where can I find [Content_Types].xml's xsd schema file?

("http://schemas.openxmlformats.org/package/2006/content-types" - is not a regular web page, nor contains something related to xsd...)


回答1:


[Content_Types].xml defines the MIME media types for the package parts in Open Packaging Conventions container-file technology that's a part of OOXML.

See the Standard ECMA-376 site, Part 2 of any edition, for the OPC XSDs, including the opc-contentTypes.xsd which you seek. It starts like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns="http://schemas.openxmlformats.org/package/2006/content-types"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://schemas.openxmlformats.org/package/2006/content-types"
  elementFormDefault="qualified" attributeFormDefault="unqualified"
  blockDefault="#all">

  <xs:element name="Types" type="CT_Types"/>

Part 4 has references and XSDs for other parts of OOXML such as WordprocessingML, SpreadsheetML, PresentationML, DrawingML, Shared MLs and Custom XML Schema.



来源:https://stackoverflow.com/questions/36428294/where-can-i-find-the-xsds-of-docx-xml-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!