SlideShare a Scribd company logo
Document Assembly Deep Dive
Part 2: XPathGenerator
DEV 213
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
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.
 Strategy
 Shift the burden to the rendering
application to handle styling and layout.
 Create a custom API to handle the
business logic and data resolution.
Requirements
•Define a consistent architecture
•Enable declarative templating
•Enable code reuse
Available Tools
•Open Packaging API
•Microsoft Open XML SDK
Typical Requirements
 Insert individual data field values
 Insert tables with cells containing field
values from a list of objects
 Insert repeating content sections where
each section may include data supplied
by one of a list of objects
 Conditionally exclude sections based on
the result of comparing a value with a
data field value
Solution Strategy
 Basic Approach:
1. Create a custom schema for the data
2. Convert the schema to an object model
3. Create a document template in Word
4. Pull data from the object model to the template
5. Test with sample data based on the schema
6. Call the custom API from the client or server
Solution Architecture
XSD
•Data Types
•Data Structure
MS Word
•Styles
•Presentation Layout
POCO
•Logic
•Data Source(s)
•Data Serialization
XML
•Data Dictionary
MS WORD
POCO
CONTENT CONTROL
XPATH XML
XSD
More Strategy
 Additional Steps…
 Insert placeholders in the template
 Manage ALL data manipulation in the API
 Manage ALL styling & layout in the template
 …and one key innovation
 Use XPATH to pull data from the model
Basic Processing Unit
MSWord Content Control
Advantages
•Easily identifiable in
WordProcessingML
•Easy to substitute for generated
content
•Can be nested within other content
controls
•“Tag” field allows us to declare
custom processing
Disadvantages
• Limited number of characters
• No support for custom properties
• No support for custom schemas
RICH TEXT CONTENT CONTROL
Title
TAG
Key Patterns
Handles Most Scenarios
Placeholders
Pulling specific data fields and
calculated values
Tables
Displaying lists and external data
May include placeholders
Tricky to deal with nested tables
Repeating Sections
Very common requirement
Images
Very common requirement
SIMPLE TEXT
Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore
TABLE
TABLE
reprehenderit in
voluptate velit esse
cillum dolore eu fugiat
nulla pariatur. Excepteur
sint occaecat cupidatat
REPEATING
SECTION
Tables
Structured Content Control
Issues
Needs a “template” for table styling
Table Content Control
Data Source
Table Layout Template
Repeating Sections
Structured Content Control
Issues
•Can be tricky to layout
•Good candidate for plugin
Repeating Section Control
CONTENT TEMPLATE
reprehenderit in
voluptate velit esse
cillum dolore eu fugiat
nulla pariatur. Excepteur
sint occaecat cupidatat
Data Source
SharePoint
Configuration
Assembly Job (Content Type)
Data Capture Fields
ECB Action for Assembly
Assembly Jobs (List)
Columns Hold Assembly Data
Lookup to Assembly Template
Custom Action to Build Document
Assembly Templates (Library)
MSWord Assembly Templates
Builder Page (Code Behind)
Loads Assembly Spec
Loads Assembly Template
Builds Document
Finished Documents (Library)
BUILDER.ASPX
Finished
Documents
Templates
Assembly Jobs
Assembly Job
Lookup
Content Type
Thank you for attending!
Ad

More Related Content

Viewers also liked (6)

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
John F. Holliday
 
Introduction and What’s new in SharePoint 2013
Introduction and What’s new in SharePoint 2013Introduction and What’s new in SharePoint 2013
Introduction and What’s new in SharePoint 2013
MJ Ferdous
 
SharePoint as a Document Management System (DMS)
SharePoint as a Document Management System (DMS)SharePoint as a Document Management System (DMS)
SharePoint as a Document Management System (DMS)
Lorne Rogers, ECM-M, PMP [Open Networker]
 
SharePoint Out of the Box
SharePoint Out of the BoxSharePoint Out of the Box
SharePoint Out of the Box
Gregory Zelfond
 
SharePoint Overview
SharePoint OverviewSharePoint Overview
SharePoint Overview
Amy Phillips
 
Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013
Vishal Pawar
 
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
John F. Holliday
 
Introduction and What’s new in SharePoint 2013
Introduction and What’s new in SharePoint 2013Introduction and What’s new in SharePoint 2013
Introduction and What’s new in SharePoint 2013
MJ Ferdous
 
SharePoint Out of the Box
SharePoint Out of the BoxSharePoint Out of the Box
SharePoint Out of the Box
Gregory Zelfond
 
SharePoint Overview
SharePoint OverviewSharePoint Overview
SharePoint Overview
Amy Phillips
 
Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013
Vishal Pawar
 

Similar to SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2 (20)

Data Access Tech Ed India
Data Access   Tech Ed IndiaData Access   Tech Ed India
Data Access Tech Ed India
rsnarayanan
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
Cory Foy
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
Kellyn Pot'Vin-Gorman
 
VSTO
VSTOVSTO
VSTO
Pham Quang
 
RPE - Template formating, style and stylesheet usage
RPE - Template formating, style and stylesheet usageRPE - Template formating, style and stylesheet usage
RPE - Template formating, style and stylesheet usage
GEBS Reporting
 
Microsoft dynamics ax 2012 development introduction part 1/3
Microsoft dynamics ax 2012 development introduction part 1/3Microsoft dynamics ax 2012 development introduction part 1/3
Microsoft dynamics ax 2012 development introduction part 1/3
Ali Raza Zaidi
 
SQL Server 2008 for .NET Developers
SQL Server 2008 for .NET DevelopersSQL Server 2008 for .NET Developers
SQL Server 2008 for .NET Developers
llangit
 
Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldev
llangit
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
llangit
 
Java development with the dynamo framework
Java development with the dynamo frameworkJava development with the dynamo framework
Java development with the dynamo framework
Patrick Deenen
 
5 hs mpostcustomizationrenefonseca
5 hs mpostcustomizationrenefonseca5 hs mpostcustomizationrenefonseca
5 hs mpostcustomizationrenefonseca
ssuserfadb24
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
Leslie Doherty
 
presentation
presentationpresentation
presentation
tutorialsruby
 
Sales forcedemo
Sales forcedemoSales forcedemo
Sales forcedemo
Raj Kumar Ranabhat
 
Xml Publisher And Reporting To Excel
Xml Publisher And Reporting To ExcelXml Publisher And Reporting To Excel
Xml Publisher And Reporting To Excel
Duncan Davies
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Ryan Riley
 
presentation
presentationpresentation
presentation
tutorialsruby
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
reedmaniac
 
PSC & OOMXL
PSC & OOMXLPSC & OOMXL
PSC & OOMXL
John Head
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
Jibran Rasheed Khan
 
Data Access Tech Ed India
Data Access   Tech Ed IndiaData Access   Tech Ed India
Data Access Tech Ed India
rsnarayanan
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
Cory Foy
 
RPE - Template formating, style and stylesheet usage
RPE - Template formating, style and stylesheet usageRPE - Template formating, style and stylesheet usage
RPE - Template formating, style and stylesheet usage
GEBS Reporting
 
Microsoft dynamics ax 2012 development introduction part 1/3
Microsoft dynamics ax 2012 development introduction part 1/3Microsoft dynamics ax 2012 development introduction part 1/3
Microsoft dynamics ax 2012 development introduction part 1/3
Ali Raza Zaidi
 
SQL Server 2008 for .NET Developers
SQL Server 2008 for .NET DevelopersSQL Server 2008 for .NET Developers
SQL Server 2008 for .NET Developers
llangit
 
Tech Days09 Sqldev
Tech Days09 SqldevTech Days09 Sqldev
Tech Days09 Sqldev
llangit
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
llangit
 
Java development with the dynamo framework
Java development with the dynamo frameworkJava development with the dynamo framework
Java development with the dynamo framework
Patrick Deenen
 
5 hs mpostcustomizationrenefonseca
5 hs mpostcustomizationrenefonseca5 hs mpostcustomizationrenefonseca
5 hs mpostcustomizationrenefonseca
ssuserfadb24
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
Leslie Doherty
 
Xml Publisher And Reporting To Excel
Xml Publisher And Reporting To ExcelXml Publisher And Reporting To Excel
Xml Publisher And Reporting To Excel
Duncan Davies
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Ryan Riley
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
reedmaniac
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
Jibran Rasheed Khan
 
Ad

More from John F. Holliday (6)

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
 
Top ten new ECM features in SharePoint 2013
Top ten new ECM features in SharePoint 2013Top ten new ECM features in SharePoint 2013
Top ten new ECM features in SharePoint 2013
John F. Holliday
 
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
John F. Holliday
 
SPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and SearchSPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and Search
John 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 Plans
John F. Holliday
 
DEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management DevelopmentDEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management Development
John 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
 
Top ten new ECM features in SharePoint 2013
Top ten new ECM features in SharePoint 2013Top ten new ECM features in SharePoint 2013
Top ten new ECM features in SharePoint 2013
John F. Holliday
 
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
SPEVO13 - Dev212 - Document Assembly Deep Dive Part 1
John F. Holliday
 
SPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and SearchSPEVO13 - IW509 - Records Management and Search
SPEVO13 - IW509 - Records Management and Search
John 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 Plans
John F. Holliday
 
DEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management DevelopmentDEV212 SharePoint 2010 Records Management Development
DEV212 SharePoint 2010 Records Management Development
John F. Holliday
 
Ad

Recently uploaded (20)

"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5..."Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
Fwdays
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5..."Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...
Fwdays
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 

SPEVO13 - Dev213 - Document Assembly Deep Dive Part 2

  • 1. Document Assembly Deep Dive Part 2: XPathGenerator DEV 213 John Holliday SharePoint Architects
  • 2.  John Holliday  CTO, SharePoint Architects, Inc.  www.SharePointArchitects.us  [email protected]  5 year SharePoint Server MVP SharePoint Author, Instructor, Developer Information Architecture Consultant Records Management Specialist
  • 3. 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.  Strategy  Shift the burden to the rendering application to handle styling and layout.  Create a custom API to handle the business logic and data resolution. Requirements •Define a consistent architecture •Enable declarative templating •Enable code reuse Available Tools •Open Packaging API •Microsoft Open XML SDK
  • 4. Typical Requirements  Insert individual data field values  Insert tables with cells containing field values from a list of objects  Insert repeating content sections where each section may include data supplied by one of a list of objects  Conditionally exclude sections based on the result of comparing a value with a data field value
  • 5. Solution Strategy  Basic Approach: 1. Create a custom schema for the data 2. Convert the schema to an object model 3. Create a document template in Word 4. Pull data from the object model to the template 5. Test with sample data based on the schema 6. Call the custom API from the client or server
  • 6. Solution Architecture XSD •Data Types •Data Structure MS Word •Styles •Presentation Layout POCO •Logic •Data Source(s) •Data Serialization XML •Data Dictionary MS WORD POCO CONTENT CONTROL XPATH XML XSD
  • 7. More Strategy  Additional Steps…  Insert placeholders in the template  Manage ALL data manipulation in the API  Manage ALL styling & layout in the template  …and one key innovation  Use XPATH to pull data from the model
  • 8. Basic Processing Unit MSWord Content Control Advantages •Easily identifiable in WordProcessingML •Easy to substitute for generated content •Can be nested within other content controls •“Tag” field allows us to declare custom processing Disadvantages • Limited number of characters • No support for custom properties • No support for custom schemas RICH TEXT CONTENT CONTROL Title TAG
  • 9. Key Patterns Handles Most Scenarios Placeholders Pulling specific data fields and calculated values Tables Displaying lists and external data May include placeholders Tricky to deal with nested tables Repeating Sections Very common requirement Images Very common requirement SIMPLE TEXT Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore TABLE TABLE reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat REPEATING SECTION
  • 10. Tables Structured Content Control Issues Needs a “template” for table styling Table Content Control Data Source Table Layout Template
  • 11. Repeating Sections Structured Content Control Issues •Can be tricky to layout •Good candidate for plugin Repeating Section Control CONTENT TEMPLATE reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat Data Source
  • 12. SharePoint Configuration Assembly Job (Content Type) Data Capture Fields ECB Action for Assembly Assembly Jobs (List) Columns Hold Assembly Data Lookup to Assembly Template Custom Action to Build Document Assembly Templates (Library) MSWord Assembly Templates Builder Page (Code Behind) Loads Assembly Spec Loads Assembly Template Builds Document Finished Documents (Library) BUILDER.ASPX Finished Documents Templates Assembly Jobs Assembly Job Lookup Content Type
  • 13. Thank you for attending!