The OPC is specified in Part 2 of the Office Open XML standards ISO/IEC 29500:2008 and ECMA-376.12
The ISO/IEC 29500-2:2008 specification and the second edition of ECMA-376 makes a normative reference to PKWARE, 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).3 The ZIP format is not specified by any international standard but has widespread community and developer acceptance.
Microsoft submitted a draft in 2006 to the Internet 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 the Internet Standard for URI schemes (STD 66, RFC 3986).4 The scheme is now listed as historical.5
The ISO 19165:1-2018 recommends the use of the Open Packaging Conventions to implement the Geospatial Package defined in the Open Archival Information System.
Both the XML Paper Specification (XPS)6 and Office Open XML (OOXML) use Open Packaging Conventions (OPC), which provide a profile of the common ZIP 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 as PNG, BMP, AVI, PDF, RTF, or even an already packaged ODF 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 and relative indirection.7
The OPC is the foundation technology for many new file formats:8
OPC is natively supported in Microsoft .NET Framework 3.0 by the System.IO.Packaging namespace. Open source libraries exist for other languages.
Since Windows 7, OPC is also natively supported in the Windows API through a set of COM interfaces, collectively referred to as Packaging 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 term package corresponds to a ZIP archive and the term part 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 a MIME media type. A part's content-type explicitly defines the type of data stored in the part and reduces duplication and ambiguity issues inherent with file extensions.
OPC packages can also include relationships that define associations between the package, parts, and external resources. In addition to a hierarchy of directories and parts, OPC packages commonly use relationships to access content through a directed 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.
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:
which defines two relations for the root package, the first one being considered as the root package (here for an early Microsoft XPS document, before it was standardized as Open 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.22 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.
ISO/IEC 29500-2:2008 - Information technology -- Document description and processing languages -- Office Open XML File Formats -- Part 2: Open Packaging Conventions, ISO http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51459 ↩
Ecma International TC45 (December 2006). "Standard ECMA-376 Office Open XML File Formats". Ecma International. Retrieved 2007-04-04.{{cite web}}: CS1 maint: numeric names: authors list (link) http://www.ecma-international.org/publications/standards/Ecma-376.htm ↩
"pack Status: historical". IANA. 2011-10-04. Retrieved 2013-05-12. https://www.iana.org/assignments/uri-schemes/historic/pack ↩
"Uniform Resource Identifier (URI) Schemes". www.iana.org. IANA. Retrieved 2013-05-12. https://www.iana.org/assignments/uri-schemes.html ↩
XPS team (2006-09-01). "Open Packaging Conventions & Open XML Markup Compatibility". XPS team blog. Retrieved 2007-04-04. http://blogs.msdn.com/xps/archive/2006/09/01/735865.aspx ↩
Rick Jeliffe (2007-07-29). "Comment on Can a file be ODF and Open XML at the same time?". O'Reilly net XML blogs. http://www.oreillynet.com/xml/blog/2007/07/can_a_file_be_odf_and_open_xml.html#comment-1027843 ↩
Adventures in Packaging - Episode 1, May 18, 2009, by Jack Davis, Microsoft Packaging Team Blog: Open Packaging Conventions http://blogs.msdn.com/opc/archive/2009/05/18/adventures-in-packaging-episode-1.aspx ↩
"Archived copy" (PDF). Archived from the original (PDF) on 2016-08-07. Retrieved 2016-05-26.{{cite web}}: CS1 maint: archived copy as title (link) https://web.archive.org/web/20160807080200/http://3mf.io/wp-content/uploads/2016/03/3MFcoreSpec_1.1.pdf ↩
"What's AutoCAD DWF file | DWG to DGN". Archived from the original on 2014-09-03. Retrieved 2014-08-30. https://web.archive.org/web/20140903092802/http://dwgtodgn.com/blog/2014/06/22/autocad-dwf.html ↩
"CDDX File Format - Circuit Diagram". www.circuit-diagram.org. https://www.circuit-diagram.org/help/cddx-file-format ↩
"CodePlex Archive". CodePlex Archive. https://archive.codeplex.com/ ↩
"Technology - FDI-Cooperation". www.fdi-cooperation.com. Archived from the original on 2014-09-19. https://web.archive.org/web/20140919040851/http://www.fdi-cooperation.com/technology.html ↩
"IEC 62769-4:2015 | IEC Webstore". webstore.iec.ch. https://webstore.iec.ch/publication/22455 ↩
"Developer tools, technical documentation and coding examples". https://msdn.microsoft.com/en-us/library/office/jj228622%28v=office.15%29.aspx ↩
"App packages and deployment (Windows Runtime apps) - Windows app development". 6 October 2015. https://msdn.microsoft.com/en-us/library/windows/apps/hh464929(v=VS.85).aspx ↩
Warren, Tom (February 11, 2014). "Windows Phone 8.1 includes universal apps and lots of feature updates". The Verge. https://www.theverge.com/2014/2/11/5400660/windows-phone-8-1-features-leaked ↩
"Content Moved (Windows)". Archived from the original on 2016-10-18. Retrieved 2015-01-26. https://web.archive.org/web/20161018234406/https://msdn.microsoft.com/en-us/library/windows/apps/bg182885.aspx ↩
Details of the Asset Administration Shell - Part 1 https://www.plattform-i40.de/PI40/Redaktion/EN/Downloads/Publikation/Details_of_the_Asset_Administration_Shell_Part1_V3.html ↩
"SpaceClaim file format". 2013-05-06. Archived from the original on 2013-09-15. Retrieved 2017-08-14. https://web.archive.org/web/20130915135338/http://www.mxcad.com/spaceclaim/working-with-spaceclaim-documents/8876-spaceclaim-file-format-421 ↩
"DataFormats.XamlPackage Field (System.Windows)". https://msdn.microsoft.com/en-us/library/system.windows.dataformats.xamlpackage(v=vs.110).aspx ↩
"Using OPC to Store Your Own Data: Page 3". www.devx.com. http://www.devx.com/dotnet/Article/41235/0/page/3 ↩