SlideShare une entreprise Scribd logo
1  sur  17
Document Assembly Deep Dive
Part 1: Open XML
DEV 212
John Holliday
SharePoint Architects
 John Holliday
 CTO, SharePoint Architects, Inc.
 www.SharePointArchitects.us
 john@johnholliday.net
 5 year SharePoint Server MVP
SharePoint Author, Instructor, Developer
Information Architecture Consultant
Records Management Specialist
Open XML
“Document Parts”
•Most parts are XML
•Can access/modify parts without
using an Office product
Common Uses
•Interrogate document data
• Search for arbitrary data
•Validate against a schema
•Manipulate existing documents
• Update content
• Remove all comments
• Scan for prohibited text
•Generate new documents
• Combine parts from library
• Generate slides, etc.
The Open XML Standard
msdn.microsoft.com
Parts and Relationships
 _rels.rels
<Relationship Id=“unique_id” Type=“relationshipType”
Target=“targetPart” />
 Id
Any string that is unique in the .rels file
 Type
One of the Open XML part schemas
http://schemas.microsoft.com/office/2006/relationships/styleSheet
 Target
The location of the target of the relationship (a document part)
Open Packaging API
 System.IO.Packaging
 Advantages
– Applies to all Office applications
 Disadvantages
– LOTS of steps involved to create real documents
Package pkg = Package.Open(“MyDocument.docx”, FileMode.Create);
…LOTS OF CODE…
OPEN PACKAGING API
Building Open XML Solutions
 Observations
 The markup languages are unique to
each document type.
 Must anticipate the need to repurpose
data across all types.
 The rendering mechanisms are unique
to each type.
Requirements
•Define a consistent architecture
•Enable declarative templating
•Enable code reuse
Available Tools
•Open Packaging API
•Microsoft Open XML SDK
•Open XML SDK Productivity Tool
Solution Strategies
 Use the Open Packaging API
 Advantages
– Can use a code generation tool to jumpstart the
project
– Difficult to understand and modify
 Disadvantages
– Must generate the entire document
– Relatively slow
 Use the Microsoft Open XML SDK
 Advantages
– Code is easier to work with
– SDK provides wrappers
 Disadvantages
– Steep learning curve
– Still slow
 Use XSLT
 Advantages
– Very Fast
 Disadvantages
– Requires XSLT Skills
Microsoft Open XML SDK
 Built on top of System.IO.Packaging
 Easier than the raw packaging API
 Wrapper classes for all Office doc types
 Wrapper classes for all known doc parts
Markup Class
WordProcessingML WordProcessingDocument
SpreadsheetML SpreadsheetDocument
PresentationML PresentationDocument
OPEN XML SDK
Open XML Productivity Tool
 Part of the Open XML SDK
 Easy to see the structure of a document
 Great for figuring out the correct elements
and attributes
 Powerful code generation built-in.
– Useful for one-off projects
OPEN XML SDK
PRODUCTIVITY TOOL
Using XSLT
 Basic Idea:
 “Flatten” the Open XML document to a non-
hierarchical XML data stream.
 Transform the XML using XSLT style sheet
 “Un-flatten” the XML back to Open XML
XSLT TRANSFORMS
Additional Resources
 Microsoft Office Open XML SDK 2.5
 Open XML SDK 2.5 Productivity Tool
 OpenXML Developer
 www.OpenXmlDeveloper.org
 Eric White’s Blog (former Microsoft)
 www.EricWhite.com
Thank you for attending!

Contenu connexe

Tendances

Angular js Online Training
Angular js Online TrainingAngular js Online Training
Angular js Online TrainingLearntek1
 
Microsoft for developers open source and cross platform
Microsoft for developers  open source and cross platformMicrosoft for developers  open source and cross platform
Microsoft for developers open source and cross platformJulie Lerman
 
Api chaining(tm)
Api chaining(tm)Api chaining(tm)
Api chaining(tm)Owen Rubel
 
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
O365Con18 - SharePoint Framework for Administrators - Waldek MastykarzO365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
O365Con18 - SharePoint Framework for Administrators - Waldek MastykarzNCCOMMS
 
Internet business logic_in_a_nutshell
Internet business logic_in_a_nutshellInternet business logic_in_a_nutshell
Internet business logic_in_a_nutshellAdrian Walker
 
Introduction To Enterprise Search Tulsa Tech Fest 2009
Introduction To Enterprise Search   Tulsa Tech Fest 2009Introduction To Enterprise Search   Tulsa Tech Fest 2009
Introduction To Enterprise Search Tulsa Tech Fest 2009Corey Roth
 
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...DIWUG
 
Standard Web APIs for Multidisciplinary Collaboration
Standard Web APIs for Multidisciplinary CollaborationStandard Web APIs for Multidisciplinary Collaboration
Standard Web APIs for Multidisciplinary CollaborationAxel Reichwein
 
#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best Practices#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best PracticesIvan Sanders
 
API Documentation Meetup 2016, London
API Documentation Meetup 2016, LondonAPI Documentation Meetup 2016, London
API Documentation Meetup 2016, LondonChristian Heidenreich
 
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...apidays
 
Introduction to Open Services for Lifecycle Collaboration (OSLC)
Introduction to Open Services for Lifecycle Collaboration (OSLC)Introduction to Open Services for Lifecycle Collaboration (OSLC)
Introduction to Open Services for Lifecycle Collaboration (OSLC)Axel Reichwein
 
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformBuild Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformAgus Suhartono
 
Using PowerShell as DSL in .Net applications
Using PowerShell as DSL in .Net applicationsUsing PowerShell as DSL in .Net applications
Using PowerShell as DSL in .Net applicationsJoy George
 

Tendances (16)

Angular js
Angular jsAngular js
Angular js
 
Angular js Online Training
Angular js Online TrainingAngular js Online Training
Angular js Online Training
 
Microsoft for developers open source and cross platform
Microsoft for developers  open source and cross platformMicrosoft for developers  open source and cross platform
Microsoft for developers open source and cross platform
 
Api chaining(tm)
Api chaining(tm)Api chaining(tm)
Api chaining(tm)
 
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
O365Con18 - SharePoint Framework for Administrators - Waldek MastykarzO365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
O365Con18 - SharePoint Framework for Administrators - Waldek Mastykarz
 
Internet business logic_in_a_nutshell
Internet business logic_in_a_nutshellInternet business logic_in_a_nutshell
Internet business logic_in_a_nutshell
 
Introduction To Enterprise Search Tulsa Tech Fest 2009
Introduction To Enterprise Search   Tulsa Tech Fest 2009Introduction To Enterprise Search   Tulsa Tech Fest 2009
Introduction To Enterprise Search Tulsa Tech Fest 2009
 
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
SPSNL17 - Getting started with SharePoint development for the reluctant IT Pr...
 
Standard Web APIs for Multidisciplinary Collaboration
Standard Web APIs for Multidisciplinary CollaborationStandard Web APIs for Multidisciplinary Collaboration
Standard Web APIs for Multidisciplinary Collaboration
 
#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best Practices#OCSPUG SharePoint 2013 Best Practices
#OCSPUG SharePoint 2013 Best Practices
 
API Documentation Meetup 2016, London
API Documentation Meetup 2016, LondonAPI Documentation Meetup 2016, London
API Documentation Meetup 2016, London
 
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...
apidays LIVE Paris 2021 - Learning the Language of HTTP for a Better Data Exp...
 
ASP.NET Core Unit Testing
ASP.NET Core Unit TestingASP.NET Core Unit Testing
ASP.NET Core Unit Testing
 
Introduction to Open Services for Lifecycle Collaboration (OSLC)
Introduction to Open Services for Lifecycle Collaboration (OSLC)Introduction to Open Services for Lifecycle Collaboration (OSLC)
Introduction to Open Services for Lifecycle Collaboration (OSLC)
 
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformBuild Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
 
Using PowerShell as DSL in .Net applications
Using PowerShell as DSL in .Net applicationsUsing PowerShell as DSL in .Net applications
Using PowerShell as DSL in .Net applications
 

En vedette

DEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management DevelopmentDEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management DevelopmentJohn F. Holliday
 
SPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and SearchSPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and SearchJohn F. Holliday
 
Building and Using SharePoint-Friendly File Plans
Building and Using SharePoint-Friendly File PlansBuilding and Using SharePoint-Friendly File Plans
Building and Using SharePoint-Friendly File PlansJohn F. Holliday
 
SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2
SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2
SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2John F. Holliday
 
Who says you can't do records management in SharePoint?
Who says you can't do records management in SharePoint?Who says you can't do records management in SharePoint?
Who says you can't do records management in SharePoint?John F. Holliday
 
IW403 Records Management Improvements in SharePoint 2010
IW403 Records Management Improvements in SharePoint 2010IW403 Records Management Improvements in SharePoint 2010
IW403 Records Management Improvements in SharePoint 2010John F. Holliday
 

En vedette (6)

DEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management DevelopmentDEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management Development
 
SPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and SearchSPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and Search
 
Building and Using SharePoint-Friendly File Plans
Building and Using SharePoint-Friendly File PlansBuilding and Using SharePoint-Friendly File Plans
Building and Using SharePoint-Friendly File Plans
 
SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2
SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2
SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2
 
Who says you can't do records management in SharePoint?
Who says you can't do records management in SharePoint?Who says you can't do records management in SharePoint?
Who says you can't do records management in SharePoint?
 
IW403 Records Management Improvements in SharePoint 2010
IW403 Records Management Improvements in SharePoint 2010IW403 Records Management Improvements in SharePoint 2010
IW403 Records Management Improvements in SharePoint 2010
 

Similaire à SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1

epicenter2010 Open Xml
epicenter2010   Open Xmlepicenter2010   Open Xml
epicenter2010 Open XmlCraig Murphy
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014OSSCube
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cfloraaluoch3
 
Building bridges - Plone Conference 2015 Bucharest
Building bridges   - Plone Conference 2015 BucharestBuilding bridges   - Plone Conference 2015 Bucharest
Building bridges - Plone Conference 2015 BucharestAndreas Jung
 
Implementing Structured FrameMaker
Implementing Structured FrameMakerImplementing Structured FrameMaker
Implementing Structured FrameMakerDkadilak62263
 
Codeigniter Introduction
Codeigniter IntroductionCodeigniter Introduction
Codeigniter IntroductionAshfan Ahamed
 
PHP - Procedural To Object-Oriented
PHP - Procedural To Object-OrientedPHP - Procedural To Object-Oriented
PHP - Procedural To Object-OrientedVance Lucas
 
Mail Merge Documents With Aspnet
Mail Merge Documents With AspnetMail Merge Documents With Aspnet
Mail Merge Documents With AspnetJames Johnson
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Bill Buchan
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Marco Breveglieri
 
TEI ODD based development
TEI ODD based developmentTEI ODD based development
TEI ODD based developmentEduard Drenth
 
SDL Trados Studio 2014... what's new?
SDL Trados Studio 2014... what's new?SDL Trados Studio 2014... what's new?
SDL Trados Studio 2014... what's new?SDL Trados
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxdanhaley45372
 
OpenProdoc Overview
OpenProdoc OverviewOpenProdoc Overview
OpenProdoc Overviewjhierrot
 
Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018Den Delimarsky
 

Similaire à SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1 (20)

epicenter2010 Open Xml
epicenter2010   Open Xmlepicenter2010   Open Xml
epicenter2010 Open Xml
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014
 
VSTO
VSTOVSTO
VSTO
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
 
Building bridges - Plone Conference 2015 Bucharest
Building bridges   - Plone Conference 2015 BucharestBuilding bridges   - Plone Conference 2015 Bucharest
Building bridges - Plone Conference 2015 Bucharest
 
Implementing Structured FrameMaker
Implementing Structured FrameMakerImplementing Structured FrameMaker
Implementing Structured FrameMaker
 
Codeigniter Introduction
Codeigniter IntroductionCodeigniter Introduction
Codeigniter Introduction
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
PHP - Procedural To Object-Oriented
PHP - Procedural To Object-OrientedPHP - Procedural To Object-Oriented
PHP - Procedural To Object-Oriented
 
Javascript mynotes
Javascript mynotesJavascript mynotes
Javascript mynotes
 
Mail Merge Documents With Aspnet
Mail Merge Documents With AspnetMail Merge Documents With Aspnet
Mail Merge Documents With Aspnet
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
 
TEI ODD based development
TEI ODD based developmentTEI ODD based development
TEI ODD based development
 
SDL Trados Studio 2014... what's new?
SDL Trados Studio 2014... what's new?SDL Trados Studio 2014... what's new?
SDL Trados Studio 2014... what's new?
 
Web component
Web componentWeb component
Web component
 
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
 
Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)Markup For Dummies (Russ Ward)
Markup For Dummies (Russ Ward)
 
OpenProdoc Overview
OpenProdoc OverviewOpenProdoc Overview
OpenProdoc Overview
 
Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018
 

Dernier

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Dernier (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1

  • 1. Document Assembly Deep Dive Part 1: Open XML DEV 212 John Holliday SharePoint Architects
  • 2.  John Holliday  CTO, SharePoint Architects, Inc.  www.SharePointArchitects.us  john@johnholliday.net  5 year SharePoint Server MVP SharePoint Author, Instructor, Developer Information Architecture Consultant Records Management Specialist
  • 3. Open XML “Document Parts” •Most parts are XML •Can access/modify parts without using an Office product Common Uses •Interrogate document data • Search for arbitrary data •Validate against a schema •Manipulate existing documents • Update content • Remove all comments • Scan for prohibited text •Generate new documents • Combine parts from library • Generate slides, etc.
  • 4. The Open XML Standard msdn.microsoft.com
  • 5. Parts and Relationships  _rels.rels <Relationship Id=“unique_id” Type=“relationshipType” Target=“targetPart” />  Id Any string that is unique in the .rels file  Type One of the Open XML part schemas http://schemas.microsoft.com/office/2006/relationships/styleSheet  Target The location of the target of the relationship (a document part)
  • 6. Open Packaging API  System.IO.Packaging  Advantages – Applies to all Office applications  Disadvantages – LOTS of steps involved to create real documents Package pkg = Package.Open(“MyDocument.docx”, FileMode.Create); …LOTS OF CODE…
  • 8. Building Open XML Solutions  Observations  The markup languages are unique to each document type.  Must anticipate the need to repurpose data across all types.  The rendering mechanisms are unique to each type. Requirements •Define a consistent architecture •Enable declarative templating •Enable code reuse Available Tools •Open Packaging API •Microsoft Open XML SDK •Open XML SDK Productivity Tool
  • 9. Solution Strategies  Use the Open Packaging API  Advantages – Can use a code generation tool to jumpstart the project – Difficult to understand and modify  Disadvantages – Must generate the entire document – Relatively slow  Use the Microsoft Open XML SDK  Advantages – Code is easier to work with – SDK provides wrappers  Disadvantages – Steep learning curve – Still slow  Use XSLT  Advantages – Very Fast  Disadvantages – Requires XSLT Skills
  • 10. Microsoft Open XML SDK  Built on top of System.IO.Packaging  Easier than the raw packaging API  Wrapper classes for all Office doc types  Wrapper classes for all known doc parts Markup Class WordProcessingML WordProcessingDocument SpreadsheetML SpreadsheetDocument PresentationML PresentationDocument
  • 12. Open XML Productivity Tool  Part of the Open XML SDK  Easy to see the structure of a document  Great for figuring out the correct elements and attributes  Powerful code generation built-in. – Useful for one-off projects
  • 14. Using XSLT  Basic Idea:  “Flatten” the Open XML document to a non- hierarchical XML data stream.  Transform the XML using XSLT style sheet  “Un-flatten” the XML back to Open XML
  • 16. Additional Resources  Microsoft Office Open XML SDK 2.5  Open XML SDK 2.5 Productivity Tool  OpenXML Developer  www.OpenXmlDeveloper.org  Eric White’s Blog (former Microsoft)  www.EricWhite.com
  • 17. Thank you for attending!