Top Banner
© 2006 Microsoft Corporation. http://www.microsoft.com/france/msdn/office/openxml/default.mspx OpenXML et .NET Pierre Lagarde [email protected] Relation Technique Développeurs Microsoft France
10

© 2006 Microsoft Corporation. http:// OpenXML et.NET Pierre Lagarde [email protected] Relation.

Dec 29, 2015

Download

Documents

Gertrude Norris
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.http://www.microsoft.com/france/msdn/office/openxml/default.mspx

OpenXML et .NET

Pierre Lagarde

[email protected]

Relation Technique Développeurs

Microsoft France

Page 2: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Open XML Interoperability

Php Java Microsoft COM

ZIP Library pclZip.lib.phpJ2SE

java.util.zip

.NET Framework 3.0System.IO.Packaging *

Xceed .NET controls (ZIP)

Xceed ActiveX controls

XML Library DOMXML Php 4DOM Php 5

JAXP.NET Framework 3.0

System.XmlMSXML

* Inclus une abstraction sur le concept OPC (Open Packaging Convention)

Page 3: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Open XML Formats Architecture

File ContainerFile Container

Document PropertiesDocument Properties

CommentsComments

WordML / Spreadsheet MLWordML / Spreadsheet ML

Custom XMLCustom XML

Embedded CodeEmbedded Code

Images / Video / SoundImages / Video / Sound

Document PartsPresque tout est XML

Chaque Part est indépendante en cas de corruption

Page 4: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Open Packaging Convention

Package – Le container

Document Parts – Les fichiers dans le container

Relationships – Relation entre les Parts

Zip

Parts et Relationships

Open Package Specification

Package (Core Properties, Preview)

Les droits numériques (Information Right Management)

Office 2007 Open XML Formats

XPS Format deDocumentX

ML

Pap

er

Sp

eci

fica

tion

FormatsPersonnalisés

Page 5: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Open Packaging Convention

Propriétés du package:CategoryContentTypeCreatorDescriptionIdentifierKeywordsModifiedRevisionlastModifiedBySubjectTitleVersion

Natif dans l’explorateur de fichier de Vista (Démo)

Page 6: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Open Packaging ConventionUne Part c’est quoi ?

Analogique à un fichier dans un système de fichierStocké dans le package et accessible via une URIStocké avec un type de contenu (Content-Type)Peut être XML, binaire ou OPC

Images, sounds, video, OLE objects, OpenXML

Le fichier [Content_Types].xml définie les types de média stockés dans le package

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><Types> <Default Extension="jpeg" ContentType="image/jpeg" /> <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"/></Types>

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><Types> <Default Extension="jpeg" ContentType="image/jpeg" /> <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"/></Types>

Page 7: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Open Packaging Convention

Chaque relation est typéExemple : Ce fichier XML a un contenu ‘stylé’ avec cette Part

http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles

Page 8: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Framework 3.0

System.IO.Packaging

Fait partie de Windows Presentation Fondation

Installé avec le Framework 3.0Directement dans Vista

Framework 1.x Framework 2.0 RunTimeFramework 2.0

WPFWF

WCFCartSpace

Framework 3.5(Automne 2007 ?)

RunTimeFramework 2.0

WPFWF

WCFCartSpace

OrcasLinq, Ajax, …

Page 9: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.

Composants de System.IO.Packaging

Les Classes:Package

Package Properties

PackageRelationships

PackageParts

Récupération des parts Récupération des parts avec System.IO.Streamavec System.IO.Stream

Common Package Parts

Pac

kage

Rel

atio

nshi

ps

Core Properties

Digital Signatures

Specific Format Parts

Office Document

Par

t Rel

atio

nshi

ps XML Part

XML Part

Par

t R

els

Etc…

PackagePart:PackagePart:CompressionOptiCompressionOptionon

ContentTypeContentType

PackagePackage

UriUri

RelationshipRelationshipIDID

PackagePackage

RelationshipTypeRelationshipType

SourceUriSourceUri

TargetModeTargetMode

TargetUriTargetUri

Page 10: © 2006 Microsoft Corporation. http://  OpenXML et.NET Pierre Lagarde pierlag@microsoft.com Relation.

© 2006 Microsoft Corporation.