| Open Packaging Conventions (OPC) | |
|---|---|
| Abbreviation | OPC |
| Native name | Office Open XML File Formats - Open PackagingConventions |
| Status | Published |
| First published | December 7, 2006 (2006-12-07) |
| Latest version | ISO/IEC 29500-2:2021 August 2021 (2021-08) |
| Organization | Microsoft,Ecma,ISO/IEC |
| Base standards | ECMA-376, ISO/IEC 29500-2 |
| Related standards | XML,ZIP |
| Domain | Electronic documents |
| Website | ECMA-376, ISO/IEC 29500-2:2021 |
TheOpen Packaging Conventions (OPC) is a container-file technology initially created byMicrosoft to store a combination ofXML and non-XML files that together form a single entity such as anOpen XML Paper Specification (OpenXPS) document. OPC-based file formats combine the advantages of leaving the independent file entities embedded in the document intact and resulting in much smaller files compared to normal use of XML.[dubious –discuss]
The OPC is specified in Part 2 of theOffice Open XML standardsISO/IEC 29500:2008 andECMA-376.[1][2]
The ISO/IEC 29500-2:2008 specification and the second edition of ECMA-376 makes a normative reference toPKWARE, Inc.'s.ZIP File Format Specification version 6.2.0 (2004), and supplements it with a normative set of clarifications. Note: The older first edition of ECMA-376 makes an informative (i.e., non-normative) reference to the newer PKWARE Inc's ".ZIP File Format Specification" version 6.2.1 (2005).[1] The ZIP format is not specified by any international standard but has widespread community and developer acceptance.
Microsoft submitted a draft in 2006 to theInternet Engineering Task Force for a "pack"URI Scheme (pack://) to be used for URI references to OPC-based packages. The draft expired in 2009, the specified syntax is incompatible with theInternet Standard for URI schemes (STD 66, RFC 3986).[3] The scheme is now listed ashistorical.[4]
The ISO 19165:1-2018 recommends the use of the Open Packaging Conventions to implement the Geospatial Package defined in theOpen Archival Information System.
Both theXML Paper Specification (XPS)[5] andOffice Open XML (OOXML) use Open Packaging Conventions (OPC), which provide a profile of the commonZIP format. In addition to data and document content in XML markup, files in the ZIP package can include other text and binary files in formats such asPNG,BMP,AVI,PDF,RTF, or even an already packagedODF file. OPC also defines some naming conventions and an indirection method to allow position independence of binary and XML files in the ZIP archive.
OPC files can be opened using common ZIP utilities. OPC allow indirection,chunking andrelative indirection.[6]
The OPC is the foundation technology for many new file formats:[7]
| File format | Filename extension | Content | Standard |
|---|---|---|---|
| 3MF Consortium3D Manufacturing Format (3MF) file format[8] | .3mf | CAD design data for additive manufacturing (3D printing) | |
| AutodeskAutoCAD Design Web Format (DWFX) file format[9] | .dwfx | CAD design data (2D/3Dcomputer graphics andtechnical drawings) | |
| AutomationML container format | .amlx | Plant engineering information | |
| Circuit Diagram Document[10] | .cddx | Circuit diagram containing layout, connections and embedded components | |
| Family.Show file format[11] | .familyx | genealogical family data, stories, and photos | |
| Field Device Integration FDI Packages[12][13] | .fdix | Field Device Integration information | IEC 62769-4:2015 |
| Microsoft Application Virtualization file format | .appv | Portable application | |
| Microsoft Power BI report file format | .pbix | Data and information visualization report file | |
| Microsoft Power BI template file format | .pbit | Data and information visualization template file | |
| Microsoft Semblio file format | .semblio | Interactive learning material, such as e-books containing images, audio, and video | |
| Microsoft Visual Studio 2010+ Extensions file format | .vsix | Integrated development environment extension | |
| Microsoft Visio 2013 drawing file format | .vsdx | Replaces .vsd (Visio binary file) and .vdx (Visio XML Drawing) formats used in earlier versions[14] | |
| MicrosoftWindows 8,Windows 8.1 andWindows Phone 8.1 App Package[15] | .appx | Software package for applications listed on Microsoft'sWindows Store andWindows Phone Store[16] | |
| MicrosoftWindows 8.1 andWindows Phone 8.1 App Bundle[17] | .appxbundle | Software package that bundles hardware platforms, languages, and resources for an application listed on Microsoft'sWindows Store andWindows Phone Store | |
| MicrosoftWindows Azure C# Package | .cspkg | Cloud platform data | |
| MicrosoftXML Paper Specification | .xps | Fixed document for document exchange | |
| MiraMon open compressed map | .mmzx | Geographic information (GeospatialRaster graphics,vector graphics andtabular data, symbolization andmetadata in files, links to geoservices, etc.) | ISO 19165-1:2018 |
| NuGet Package | .nupkg | Software package for apackage management system | |
| Office Open XML Document | .docx | Word processing document | ECMA-376, ISO/IEC 29500:2008 |
| Office Open XML Presentation | .pptx | Presentation file | ECMA-376, ISO/IEC 29500:2008 |
| Office Open XML Workbook | .xlsx | Spreadsheet workbook | ECMA-376, ISO/IEC 29500:2008 |
| Open XML Paper Specification | .oxps | Fixed document for document exchange | ECMA-388 |
| Platform Industrie 4.0 - Administrative Asset Shell[18] | .aasx | Package file format for Administrative Asset Shells (AAS) | |
| Siemens Digital Industries Software file format | .jtx | ||
| MathWorksSimulink model file | .slx | Dynamic system specification forModel-based design | |
| SMPTE Media Package | .smpk | Storage format for distribution and playback of multimedia video and audio files | SMPTE ST 2053-2011 |
| SpaceClaim 3Dsolid model file[19] | .scdoc | Embedded 3D CAD data files includeStandard ACIS Binary (SAB) solid model files | |
| MicrosoftXAML Package | – | Not a specification. Function supported by.NET Framework only for savingWPFFlowDocument with images[20] |
OPC is natively supported in Microsoft.NET Framework 3.0 by theSystem.IO.Packaging namespace. Open source libraries exist for other languages.
SinceWindows 7, OPC is also natively supported in theWindows API through a set ofCOM interfaces, collectively referred to asPackaging API.
Alternatively, ZIP libraries can be used to create and open OPC files, as long as the correct files are included in the ZIP and the conventions followed.

In OPC terminology, the termpackage corresponds to a ZIP archive and the termpart corresponds to a file stored within the ZIP. Every part in a package has a unique URI-compliant part name along with a specified content-type expressed in the form of aMIMEmedia type. A part's content-type explicitly defines the type of data stored in the part and reduces duplication and ambiguity issues inherent withfile extensions.
OPC packages can also includerelationships that define associations between the package, parts, and external resources. In addition to a hierarchy of directories and parts, OPC packages commonly userelationships to access content through adirected graph of relationship associations. Relationships are composed of four elements:
OPC packages can store parts that contain any type of data (text, images, XML, binary, whatever). The extension ".rels", however, is reserved for storing relationships metadata within "/_rels" subfolders. The subfolder name "_rels", the file extension ".rels" within such directory, and the filename "[Content_Types].xml" in any folder are the only three reserved names for files stored in an OPC package.
<DefaultExtension="rels"ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
All relationships (including the relations associated to the root package) are represented as XML files. If you open a ".rels" file in a text editor, you can view the actual XML markup that defines all the relationships targeted from that part. A typical relationships file contains XML code like this:
<Relationshipsxmlns="http://schemas.openxmlformats.org/package/2006/relationships"><RelationshipId="R0"Type="http://schemas.microsoft.com/xps/2005/06/fixedrepresentation"Target="/FixedDocumentSequence.fdseq"/><RelationshipId="R1"Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail"Target="/Documents/1/Metadata/Page1_Thumbnail.JPG"/></Relationships>
which defines two relations for the root package, the first one being considered as the root package (here for an earlyMicrosoft XPS document, before it was standardized asOpen XML Paper Specification within the openxmlformats collection), and the other one being used to reference an alternate form (here a thumbnail rendered image of the first page of the document).
The main parts of the embedded documents are often stored within a folder named "/Document" (which may contain subdirectories itself, if the file contains several related documents each of them with various parts), and the optional metadata parts that are not needed for processing the main parts of the document are stored in a folder named "/Metadata"; however these actual folder names are actually specified within the XML-formatted data in "[partname].rels" relationship files and the OPC specification allows any folder organisation that is convenient for the application and these two folder names are not required.
It encourages documents to be split into small chunks. This is better for reducing the effect of file corruption.[21] And better for data access: for example, all the style information in one XML part, each separate worksheet or table in their own different parts. This allows faster access and less object creation for clients and makes it easier for multiple processes to be working on the same document.
In the Open Packaging Conventions, each file that has reference has its own_rels file with the indirection lists. This makes it easier to cut and paste some information with all its associated resources in some cases, provides name scoping to remove the chance of name clashing between files, and so on.
{{cite web}}: CS1 maint: numeric names: authors list (link){{cite web}}: CS1 maint: archived copy as title (link)