Presentation is loading. Please wait.

Presentation is loading. Please wait.

Open XML Formats Jessica Gruber Consultant Microsoft Corporation.

Similar presentations


Presentation on theme: "Open XML Formats Jessica Gruber Consultant Microsoft Corporation."— Presentation transcript:

1

2 Open XML Formats Jessica Gruber Consultant Microsoft Corporation

3 Agenda Introduction to the new formats (demos) Developer view of the Open XML Formats Tools for working with Open XML Files (demos) Server development scenarios (demos) Question and Answer

4 Session Goals Understand the benefits of Office Open XML solutions for developers Introduction to Microsoft tools for Open XML development Learn basic developer patterns for Working with Packages and Parts (Zip) Navigating through relationships (XML) Manipulating data within parts (XML) Kick off the conversation on OpenXMLDeveloper.org

5 Open XML Formats New XML file formats for Word, Excel and PowerPoint New formats will be the default file formats, with new file type extensions (.docx;.pptx;.xlsx) Fully 100% compatible with existing formats Open, transparent format improves interoperability XML - Transparent, XML format enables new integration scenarios for documents and LOB systems ZIP container - allows for standard compression on all files without user effort Licensing - Removed need for license by providing a Covenant that says we won’t enforce IP against folks implementing the format (100% royalty free) Standardization Ecma International - created TC45 to fully document the Open XML formats Members include: Apple, Barclays Capital, BP, the British Library, Essilor, Intel Corporation, NextPage Inc., Statoil ASA and Toshiba Current spec is already over 2000 pages

6 Open XML Formats (cont’d) Added Benefits: compact and robust ZIP container allows for standard compression on all files without user effort (Dramatic file size improvements) Significantly more robust files to help minimize data loss Backward Compatible: Office 2000, Office XP, Office 2003 will all support the new formats Patches for compatibility available by launch Open, edit and save new formats Legacy support: Current Office 97-2003 binary file formats supported Support for XML formats from Office 2003, Office XP continued Developers: Endless potential for developers Build solutions to read, write, and modify Office files (without the need to run Office APIs)

7 Evolution Of File Formats Office 2000 Early Innovation XML document properties Office 97 Existing binary file formats designed in 1994, launched in Office 97 Office XP First XML Format Spreadsheet XML Office 2003 Breakthrough XML Support WordML, SpreadsheetML Custom-defined schema Office 2007 New XML Formats XML file format default XML PowerPoint format “Wave 12”

8 Components of the new formats Package – ZIP Container Part – The “files” inside the ZIP Content Types – Each part has a content type that is enforced on open Relationships – Any part that references another part must do so via a relationship

9 Introduction to the new File Format

10 Document Analyzer Office Open XML Formats

11 User view: single Office “file” Questionaire.docx Document Parts Most parts are XML Each XML part is a discreet, compressed component Can add, extract and modify individual parts using any Zip implementation Corruption or absence of any part would not prohibit the file from being opened Developer view: modular file Open XML Formats Architecture

12 Benefits Of Open XML Solutions No longer need to automate client applications to open and modify files Unsupported solution on server Clients not designed for this scenario Reliability Access directly the parts you need Avoid corruption Transparency Direct access to your data!

13 Tools for Accessing Data In Office Open XML files XML Editing Notepad? System.XML makes this easier ZIP Manipulation Compressed Folders in Windows? Third-Party Zip Libraries Microsoft’s Packaging API’s Office Open XML Resource Kit Code Snippets - Beta 2 C# and VB.NET Validation Library Parses a file and reports on schema, relationship errors and warnings Schemas already in the ECMA document

14 System.IO.Packaging Part of Windows Presentation Foundations (WinFX) Ships with Vista Betas available now Requires.NET 2.0 Enables package manipulation for Office Open XML File Formats XML Paper Specification Files Any Open Packaging Convention files

15 PackagePackagePartPackagePartCollectionPackageRelationshipPackageRelationshipCollectionPackUriHelper System.IO.Packaging API functionality Create/Open packages Create and delete parts and relationships Read and write part streams Iterate through collections of parts and relationships

16 Reading Data From Files Microsoft Office PowerPoint 2007

17 System.IO.Packaging.Package Package class provides methods to create, enumerate and delete the following entities Package Package Relationships PackageProperties Parts Package Relationships Core Properties Common Package Parts Thumbnail Digital Signatures officeDocument XML Part Specific Format Parts Etc… Part Rels XML Part Part Rels

18 System.IO.Packaging.Relationship Relationships tie the parts together Required to find parts (part names are not guaranteed) Iterate through RelationshipCollection by Type or ID Relationship Properties ID Package RelationshipType SourceUri TargetMode TargetUri Package Relationships Core Properties Common Package Parts Thumbnail Digital Signatures officeDocument XML Part Specific Format Parts Etc… Part Rels XML Part Part Rels officeDocument XML Part

19 System.IO.Packaging.PackagePart Parts are the objects of data within the Package PackagePart provides support to create, enumerate and delete part relationships Get Part data as Stream PackagePart Properties: CompressionOption ContentType Package Uri Package Relationships Core Properties Common Package Parts Thumbnail Digital Signatures officeDocument XML Part Specific Format Parts Etc… Part Rels XML Part Part Rels - The Quick Brown Fox jumped over the river. … XML Part - The Cow jumped over the moon. …

20 System.IO.Packaging.PackURIHelper Helper class to aid working with URIs URIs required to GetParts Create or Get URIs for Packages Parts Relationship parts Resolve relative URIs for parts from source to target part

21 The Role Of XML With Documents ScenarioExample Document Assembly Server-based or user-assisted construction of documents from archived content or database content Create sales reports from financial and forecast data stored in a CRM system Content Reuse Much easier to move content between documents, including different document types Apply content stored in Word documents to Web pages quickly and efficiently Content Tagging Add domain-specific metadata to document content to enable custom solutions Tag presentations using a specific taxonomy to improve knowledge management efficiency Document Interrogation Query document repositories based on custom data, content types or document metadata Search for all documents containing a specific company name or sales contact Document Sanitization Remove unwanted content like comments or embedded code from your document when appropriate Remove all tracked changes and comments from a Word document before it is published

22 Document Interrogation Scenarios When you need meta-data about Office files on a server Building reports from data in files Workflow and Content Management scenarios Validate compliance

23 Document Analyzer Office Open XML Formats

24 Document Assembly Scenarios Useful when documents need to be generated from structured data Auto generate reports in Excel from data in database Create documents for users from form data Repurpose existing data (slide libraries) Recommendation: Start from a template

25 Document Assembly Office Open XML Formats

26 Document Sanitization Scenarios Security Remove active content (VBA, ActiveX) Privacy Remove comments, revisions, hidden text Remove or alter document properties Legal Insert copyrights, watermarks, images Run as part of Workflows, publishing, compliance scenarios

27 Document Sanitization Office Open XML Formats

28 New community formed to help bring developers together Currently sponsored by almost 40 institutions from around the world Community and website for information exchange Free of Charge: Available to everyone that wants to participate; encourage development on all platforms Be one of the first to join the community! http://openxmldeveloper.org

29 Resources OpenXMLDeveloper.org Kevin Boske’s Blog http://blogs.msdn.com/kevinboske Brian’s Blog http://blogs.msdn.com/brian_jones WinFX Developer Center http://msdn.microsoft.com/winfx/ Latest CTP: http://msdn.microsoft.com/windowsvista/getthebeta/default.aspx XPS Blog: http://blogs.msdn.com/xps

30 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Open XML Formats Jessica Gruber Consultant Microsoft Corporation."

Similar presentations


Ads by Google