Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Open Packaging Conventions

From Wikipedia, the free encyclopedia
Digital container format
Not to be confused withOpen Packaging Format (OPF), an unrelated format that describes the structure of anEPUB file in XML.
Open Packaging Conventions (OPC)
AbbreviationOPC
Native name
Office Open XML File Formats - Open PackagingConventions
StatusPublished
First publishedDecember 7, 2006 (2006-12-07)
Latest versionISO/IEC 29500-2:2021
August 2021 (2021-08)
OrganizationMicrosoft,Ecma,ISO/IEC
Base standardsECMA-376, ISO/IEC 29500-2
Related standardsXML,ZIP
DomainElectronic documents
WebsiteECMA-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.[dubiousdiscuss]

Specifications

[edit]

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.

Usage

[edit]

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]

File formats using the OPC

[edit]

The OPC is the foundation technology for many new file formats:[7]

File formatFilename extensionContentStandard
3MF Consortium3D Manufacturing Format (3MF) file format[8].3mfCAD design data for additive manufacturing (3D printing)
AutodeskAutoCAD Design Web Format (DWFX) file format[9].dwfxCAD design data (2D/3Dcomputer graphics andtechnical drawings)
AutomationML container format.amlxPlant engineering information
Circuit Diagram Document[10].cddxCircuit diagram containing layout, connections and embedded components
Family.Show file format[11].familyxgenealogical family data, stories, and photos
Field Device Integration FDI Packages[12][13].fdixField Device Integration informationIEC 62769-4:2015
Microsoft Application Virtualization file format.appvPortable application
Microsoft Power BI report file format.pbixData and information visualization report file
Microsoft Power BI template file format.pbitData and information visualization template file
Microsoft Semblio file format.semblioInteractive learning material, such as e-books containing images, audio, and video
Microsoft Visual Studio 2010+ Extensions file format.vsixIntegrated development environment extension
Microsoft Visio 2013 drawing file format.vsdxReplaces .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].appxSoftware package for applications listed on Microsoft'sWindows Store andWindows Phone Store[16]
MicrosoftWindows 8.1 andWindows Phone 8.1 App Bundle[17].appxbundleSoftware package that bundles hardware platforms, languages, and resources for an application listed on Microsoft'sWindows Store andWindows Phone Store
MicrosoftWindows Azure C# Package.cspkgCloud platform data
MicrosoftXML Paper Specification.xpsFixed document for document exchange
MiraMon open compressed map.mmzxGeographic information (GeospatialRaster graphics,vector graphics andtabular data, symbolization andmetadata in files, links to geoservices, etc.)ISO 19165-1:2018
NuGet Package.nupkgSoftware package for apackage management system
Office Open XML Document.docxWord processing documentECMA-376, ISO/IEC 29500:2008
Office Open XML Presentation.pptxPresentation fileECMA-376, ISO/IEC 29500:2008
Office Open XML Workbook.xlsxSpreadsheet workbookECMA-376, ISO/IEC 29500:2008
Open XML Paper Specification.oxpsFixed document for document exchangeECMA-388
Platform Industrie 4.0 - Administrative Asset Shell[18].aasxPackage file format for Administrative Asset Shells (AAS)
Siemens Digital Industries Software file format.jtx
MathWorksSimulink model file.slxDynamic system specification forModel-based design
SMPTE Media Package.smpkStorage format for distribution and playback of multimedia video and audio filesSMPTE ST 2053-2011
SpaceClaim 3Dsolid model file[19].scdocEmbedded 3D CAD data files includeStandard ACIS Binary (SAB) solid model files
MicrosoftXAML PackageNot a specification. Function supported by.NET Framework only for savingWPFFlowDocument with images[20]

Programming

[edit]

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.

Package, parts, and relationships

[edit]
Container structure of Part 2 of the Ecma Office Open XML standard, ECMA-376

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:

  • an identifier (ID)
  • an optional source (the package or a part within the package)
  • a relationship type (a URI-style expression that defines the type of the relationship)
  • a target (aURI to another part within the package or to an external resource)

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.

/[Content_Types].xml file
This file defines theMIMEmedia types for all the parts stored in the package. The "/[Content_Types].xml" file defines default mappings based on file extensions, along with overrides for specific parts with content-types that are different from the file extension defaults. For example, one of these defined MIME types is:
<DefaultExtension="rels"ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
/_rels
The root level "/_rels" folder stores the relationships for the package as a whole. The "/_rels" folder normally contains a file named ".rels". "/_rels/.rels" is an XML file where the startingpackage-level relationships are stored. Normally when opening an OPC-based file, applications start by accessing to the "/_rels/.rels" file to read the starting package-level relationships.
[partname].rels
Each part may have its own relationships. The_rels folders are where one goes to find the relationships for any given part within the package. To find the relationships for a specific part, one looks in the "_rels" folder that is a sibling of that part: If the part has relationships, the "_rels" folder will contain a file that has one's original part name with a ".rels" appended to it. For example, if the content types part file had any relationships, there would be a file called "[Content_Types].xml.rels" inside the "/_rels" folder.

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.

Chunking

[edit]

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.

Relative indirection

[edit]

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.

References

[edit]
  1. ^abISO/IEC 29500-2:2008 - Information technology -- Document description and processing languages -- Office Open XML File Formats -- Part 2: Open Packaging ConventionsArchived 2016-10-19 at theWayback Machine, ISO
  2. ^Ecma International TC45 (December 2006)."Standard ECMA-376 Office Open XML File Formats". Ecma International.Archived from the original on 2011-09-02. Retrieved2007-04-04.{{cite web}}: CS1 maint: numeric names: authors list (link)
  3. ^"pack Status: historical".IANA. 2011-10-04.Archived from the original on 2013-03-08. Retrieved2013-05-12.
  4. ^"Uniform Resource Identifier (URI) Schemes".www.iana.org.IANA.Archived from the original on 2013-04-25. Retrieved2013-05-12.
  5. ^XPS team (2006-09-01)."Open Packaging Conventions & Open XML Markup Compatibility". XPS team blog.Archived from the original on 2007-10-11. Retrieved2007-04-04.
  6. ^Rick Jeliffe (2007-07-29)."Comment on Can a file be ODF and Open XML at the same time?". O'Reilly net XML blogs.
  7. ^Adventures in Packaging - Episode 1Archived 2009-08-22 at theWayback Machine, May 18, 2009, by Jack Davis, Microsoft Packaging Team Blog: Open Packaging Conventions
  8. ^"Archived copy"(PDF). Archived fromthe original(PDF) on 2016-08-07. Retrieved2016-05-26.{{cite web}}: CS1 maint: archived copy as title (link)
  9. ^"What's AutoCAD DWF file | DWG to DGN". Archived fromthe original on 2014-09-03. Retrieved2014-08-30.
  10. ^"CDDX File Format - Circuit Diagram".www.circuit-diagram.org.Archived from the original on 2017-07-22. Retrieved2020-07-30.
  11. ^"CodePlex Archive".CodePlex Archive.Archived from the original on 2021-02-19. Retrieved2020-07-30.
  12. ^"Technology - FDI-Cooperation".www.fdi-cooperation.com. Archived fromthe original on 2014-09-19.
  13. ^"IEC 62769-4:2015 | IEC Webstore".webstore.iec.ch.
  14. ^"Developer tools, technical documentation and coding examples".Archived from the original on 2015-01-10. Retrieved2015-01-26.
  15. ^"App packages and deployment (Windows Runtime apps) - Windows app development". 6 October 2015.Archived from the original on 23 December 2014. Retrieved26 January 2015.
  16. ^Warren, Tom (February 11, 2014)."Windows Phone 8.1 includes universal apps and lots of feature updates".The Verge.Archived from the original on April 28, 2019. RetrievedSeptember 7, 2017.
  17. ^"Content Moved (Windows)". Archived fromthe original on 2016-10-18. Retrieved2015-01-26.
  18. ^Details of the Asset Administration Shell - Part 1
  19. ^"SpaceClaim file format". 2013-05-06. Archived fromthe original on 2013-09-15. Retrieved2017-08-14.
  20. ^"DataFormats.XamlPackage Field (System.Windows)".
  21. ^"Using OPC to Store Your Own Data: Page 3".www.devx.com. Archived fromthe original on 2011-06-09. Retrieved2009-06-23.

External links

[edit]
Archiving only
Compressing only
Archiving
and compressing
Software packaging
and distributing
Document packaging
and distributing
Graphics and UI
Audio
Multimedia
Web
Data access
Networking
Communication
Administration and
management
Component model
Libraries
Device drivers
Security
.NET
Software factories
IPC
Accessibility
Text and multilingual
support
File formats
Related topics
Computer-aided design (CAD) software
Free and
open-source
Mechanical
2D (CADD)
2D/3D (CAx/FEx)
Architectural (AEC)
Electrical
Optical
Garment
Proprietary
Mechanical
Architectural (AEC)
Electrical
Optical
Garment
  • Clo3D
  • Embird
File formats
Modeling
kernels
Historic
Italics= discontinued

Computer-aided industrial designComparisonHistory

Media related toCAD at Wikimedia Commons •iconEngineering portalGlossary of terms
Retrieved from "https://en.wikipedia.org/w/index.php?title=Open_Packaging_Conventions&oldid=1306711584"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp