No Ki Magic
Or
Hyperdocument Authoring Link Management
Using Git and XQuery in Service of an Abstract
Hyperdocument Management Model Applied to
DITA Hyperdocuments
8/14/2015 Contrext, LLC 1
Eliot Kimber
Contrext, LLC
Balisage 2015
WHAT AM I TALKING ABOUT?
8/14/2015 Contrext, LLC 2
Link Management and
Configuration Management
8/14/2015 Contrext, LLC 3
DITA
8/14/2015 Contrext, LLC 4
Solution Implementation
8/14/2015 Contrext, LLC 5
LINK AND CONFIGURATION
MANAGEMENT
8/14/2015 Contrext, LLC 6
The Problems
• As an author: What can I link to and how do I
address it?
• As an authoring tool: What does this indirect
address point to?
• As a deliverable producer: What is the set of
resources I require in order to produce a
deliverable from the input publication source?
• As a manager: What is the version-specific
configuration of this publication in a specific
repository access context?
8/14/2015 Contrext, LLC 7
The Essential Issue
• Given a collection of source components with
links among them and managed through
asynchronous revision processes, what is the
time-specific configuration of those
components at any moment in time as viewed
by a given agent for a specific purpose?
• In DITA terms: When I process a map in a
specific access context, what do I see and
what can I see?
8/14/2015 Contrext, LLC 8
Interlude: A (bit of a) Poem
Time present and time past
Are both perhaps present in time future,
And time future contained in time past.
If all time is eternally present
All time is unredeemable.
What might have been is an abstraction
Remaining a perpetual possibility
Only in a world of speculation.
What might have been and what has been
Point to one end, which is always present.
…
—T.S Eliot, "Four Quartets 1: Burnt Norton"
8/14/2015 Contrext, LLC 9
BACKGROUND
8/14/2015 Contrext, LLC 10
Aikido
• A defensive martial art based on blending with an
attacker's energy, capturing their balance, and
redirecting their energy in order to return them
to harmony
• Goal of Aikido is ultimately universal peace and
harmony
• There is no one true way to do Aikido
– Aikidosa are expected to develop their own
expression and interpretation of Aikido as they
develop their skills
• It's all about connection
8/14/2015 Contrext, LLC 11
DITA
• A standard XML application architecture for human-
consumed documents
• Optimized for interchange and interoperation of
content, processing, and DITA-specific knowledge
• Distinguishing architectural features:
– Specialization: enables controlled extension from base
DITA markup vocabulary
– Use-by reference: Content components can be used in
multiple contexts (DITA maps, content reference)
– Indirect addressing: keys and key references
– Designed to work entirely from a file system
• DITA is all about connection
8/14/2015 Contrext, LLC 12
Another Poem
If you have not
Linked yourself
To true emptiness,
You will never understand
The Art of Peace.
—Morihei Ueshiba, The Art of Peace,
translated by John Stevens.
8/14/2015 Contrext, LLC 13
Direct vs. Indirect Addressing
8/14/2015 Contrext, LLC 14
• Blend and redirect to appropriate target
• Harder to learn and execute but more
effective
• Many options at time of action
• Death does not result
Indirect addressing
• Quick, effective, fragile.
• Relatively easy to learn and execute
• Predetermined response to a given attack
• Death results
Direct addressing
Indirection Is Necessary For
Survival
• Direct addressing is preferred for delivery
– Fast, uncomplicated, reliable,
• Indirect addressing is required for authoring
– Flexible, robust, complicated
– The link must live to link another day
• Allows binding same address to different targets in
different use contexts
• Without indirection many authoring and configuration
use cases cannot be satisfied
• Prefer a standard, interoperable way to do indirect
addressing
8/14/2015 Contrext, LLC 15
Different Use Contexts
• Same component used
multiple times in the same
hyperdocument
• Same component used in
different hyperdocuments
• Same component used in
different versions in time of
a given hyperdocument
8/14/2015 Contrext, LLC 16
Map
1
Topic
A
Topic
A
Map
1
Topic
A
Map
2
Map 1
V1
Topic A
V1
Map 1
V2
DITA Maps and Topics
• Topics: XML documents that contain content
– All content is contained by topics
– Topics are intended to be more-or-less context
independent
• Maps: XML documents containing nothing but
links
– Links to other maps
– Links to topics
– Links to non-DITA things
8/14/2015 Contrext, LLC 17
Map 1
Topic A
Topic B
DITA Keys (No Magic)
• Keys are defined in maps
• Key definition binds a key name to a resource
• Resource can be a topic, a map, or a non-DITA
thing (image, Web site, etc.)
• Same key name can have different bindings in
different maps
• A key reference can be used any place a direct
URI reference is allowed
8/14/2015 Contrext, LLC 18
ABSTRACT VERSION AND
LINK MANAGEMENT MODEL
8/14/2015 Contrext, LLC 19
Snapshot-Based Configuration
Management (SnapCM)
• First formulated around 1999 by Heintz, Kimber,
et. al.
• Combines Heintz' version management insights
with Kimber's hyperdocument representation
and management insights
• Driven in large part by experience with legislative
document management workflows and business
requirements (bill drafting)
– Arguably the hardest set of requirements one could
have
8/14/2015 Contrext, LLC 20
Branches and Snapshots
• A Repository contains Resources
• Resources have Versions
• A Repository has one or more
Branches
• A Branch is a linear sequence of
Snapshots
• A Snapshot points to zero or more
Versions
– Constraint: no two Versions have
the same Resource
8/14/2015 Contrext, LLC 21
Configuration Management
• By default, can only see versions on Branch
– Current Snapshot
– Earlier Snapshots
• A link to a Resource is resolved using a
"resolution policy""
• Default policy is "on Snapshot"
• Thus, a Snapshot represents a version-specific
configuration of a set of Resources
8/14/2015 Contrext, LLC 22
SOLUTION: DITA FOR SMALL
TEAMS
8/14/2015 Contrext, LLC 23
DITA for Small Teams (DFST)
• Show how open-source tools can be combined to
create a reasonable DITA authoring and production
support system
• Four main parts:
– Versioned content storage: git, mercurial, etc.
– Authoring: oXygen XML, etc.
– Production and delivery: Continuous integration + DITA
Open Toolkit
– Link Management: Under development
• Link management is the one missing piece
• I'm implementing link management for use in the DFST
context
8/14/2015 Contrext, LLC 24
Git-Based DFST
8/14/2015 Contrext, LLC 25
Git
Repository Git Hooks
Link
management
Processing
Authoring Environment
Link
Managemen
t
Repository
Web App
Link Management Deliverable Production
CI
Server
Git
Repository
DITA
OT
Git push
Deliverabl
e
Deliverabl
e
Deliverable
Git As the Repository
• Git's versioning model close match to the
abstract model
• Does not, by itself, provide branch-specific
access control
• Can get the effect by having multiple clones
with different branches exposed
• Git hooks feed updates to Link Manager
8/14/2015 Contrext, LLC 26
Link Management
• DITA-specific XQuery application: BaseX, XQuery 3.1
• Maintains where-used index based on links in the
source documents
• Implements DITA key space construction and key
resolution
• Fundamentally just data processing
• Some tricky bits due to DITA features:
– Map trees
– Conditional key definitions and map references
– Key scopes (DITA 1.3)
– Branch filtering (DITA 1.3)
8/14/2015 Contrext, LLC 27
Git For Versioning Model
• Git branch = SnapCM Branch
• Git commit = SnapCM Snapshot
• Link management repository mirrors git
repository/branch organization
• Current implementation only reflects current
commit
– Could reflect any commits, just costs storage
• Git atomic commit of multiple objects allows
consistent link management state
8/14/2015 Contrext, LLC 28
No Key Magic:
Link Management (LM) Database
• XQuery database (BaseX)
– Heavy dependence on XPath 3.1 (maps)
– Would be much less convenient without maps
• One top-level collection per git repo/branch
pair
• Parallel link metadata database with link
management "index"
• Functions to encapsulate the git nature of the
database organization
8/14/2015 Contrext, LLC 29
Where-Used Index
• Each target doc has a directory in the LM
database
• Directory contains one or more use records
recording details of the linking element
• Where-used query:
– Is there a directory for the target doc?
• No: Not used
• Yes: get use records
8/14/2015 Contrext, LLC 30
Direct Links
• Find all links: //*[@href]
• Resolve the addresses
• Record use records
8/14/2015 Contrext, LLC 31
<dfst:useRecord xmlns:dfst="http://dita-for-small-teams.org"
resourceKey="bL1LeEVFr4lAgv77oEaECA==^1.2"
targetDoc="dfst^dfst-sample-project^master/docs/topic-01.dita"
usingDoc="dfst^dfst-sample-project^master/docs/pub-02.ditamap"
linkType="topicref"
linkClass="- map/topicref "
linkContext="navtree"
format="dita"
scope="local">
<title>Publication Two</title>
</dfst:useRecord>
Indirect Links
• Find all maps: /*[contains(@class, ' map/map ')]
• Generate resolved maps that reflect directly-referenced
submaps—store in LM database.
• Construct key space documents from resolved maps.
• Use generated IDs to correlate key definitions in
resolved maps and keys spaces to content key
definitions
• Find all indirect links: //*[@keyref]
• Resolve indirect links to targets
• Record use records
8/14/2015 Contrext, LLC 32
Link Management Web App
• RESTXQ Web app
– Web pages
– REST API
– Quick and easy to implement
• Report on whatever is interesting about the link
nature of the content
– Where is something used?
– What are the links?
– Map structures
– Dependencies emanating from a given object
8/14/2015 Contrext, LLC 33
Demo
• Oops, out of time
8/14/2015 Contrext, LLC 34
CONCLUSIONS AND FUTURE
WORK
8/14/2015 Contrext, LLC 35
What Was Easy?
• Git for versioned hyperdocument source
management: direct match to SnapCM model
• BaseX: Easy to set up and use for DITA content
– Direct support for XML catalogs
– RESTXQ implementation
– Lightweight installation
• Direct address resolution
• DITA map resolution (ignored harder bits for
now)
8/14/2015 Contrext, LLC 36
What Was Hard
• Key space construction
– I struggled to work with XQuery 3.1 maps
– No code authoring support for complex maps
• I miss my Java IDE (I am weak and feeble from my
dependence on strongly-typed language programming)
– Scoped keys add data processing complexity
aggravated by my weak map fu
• XQuery update does not allow naïve
approaches to LM database population
8/14/2015 Contrext, LLC 37
Future Work
• Finish out DITA key space construction (key scopes,
branch filtering, dynamic conditional processing)
• Finish out basic link management reporting features
• Implement basic REST API for accessing link
management information
• Docker container packaging for ease of deployment
• Tighter integration with authoring tools
• Better error reporting for link management data
processing
• Oh, yeah, documentation…
8/14/2015 Contrext, LLC 38
Questions?
8/14/2015 Contrext, LLC 39
Resources
• DITA for Small Teams:
https://github.com/dita-for-small-teams
• Me: ekimber@contrext.com,
http://contrext.com
8/14/2015 Contrext, LLC 40

More Related Content

PPTX
Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys
PPTX
They Worked Before, What Happened? Understanding DITA Cross-Book Links
PPTX
Why Is DITA So Hard?
PPTX
DITA for Small Teams
PPTX
MetadataTheory: Metadata Tools (7th of 10)
PDF
Troubleshooting Plan Changes with Query Store in SQL Server 2016
PDF
Integrating Flink with Hive - Flink Forward SF 2019
PPTX
DITA Quick Start for Authors Part II
Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys
They Worked Before, What Happened? Understanding DITA Cross-Book Links
Why Is DITA So Hard?
DITA for Small Teams
MetadataTheory: Metadata Tools (7th of 10)
Troubleshooting Plan Changes with Query Store in SQL Server 2016
Integrating Flink with Hive - Flink Forward SF 2019
DITA Quick Start for Authors Part II

Viewers also liked (10)

KEY
The Return of the Living Datalog
PPT
Information Flow based Ontology Mapping - 2002
PDF
AI & Big Data Analytics : Innovation trends and use cases
PDF
from text and ontology : methodologies and tools - Text2Onto
PPTX
Ontology Engineering for Big Data
PPTX
Web crawler
PDF
Big Data & Artificial Intelligence
PDF
Predictive Analytics - Big Data & Artificial Intelligence
PPT
RDF and OWL
PPTX
Document management system
The Return of the Living Datalog
Information Flow based Ontology Mapping - 2002
AI & Big Data Analytics : Innovation trends and use cases
from text and ontology : methodologies and tools - Text2Onto
Ontology Engineering for Big Data
Web crawler
Big Data & Artificial Intelligence
Predictive Analytics - Big Data & Artificial Intelligence
RDF and OWL
Document management system
Ad

Similar to No Ki Magic: Managing Complex DITA Hyperdocuments (20)

PPTX
DITA 1.3: What's New and Different
PPTX
DITA 1.3: What's New and Different
PPTX
What's New in DITA 1.3 (Tekom, Nov 2014)
PPTX
Content Management on Zero Budget: DITA for Small Teams
PDF
Overview of DITA 1.3
PPTX
DITA for Small Teams: An Open Source Approach to DITA Content Management
PPT
Doctraineast2008
PPTX
Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys
PPT
DITA on a Shoe String
PPTX
Using DITAworks for Eclipse Help publishing
PPTX
RELAX NG and DITA: An Almost Perfect Match
PPTX
One Tool to Help Them All - Leigh White
PPTX
What's New in DITA 1.3
PPT
Painless XML Authoring?: How DITA Simplifies XML
PDF
Reports and DITA Metrics IXIASOFT User Conference 2016
PDF
Single Source Publishing: Utilizing XML and DITA
PPTX
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse?
PPT
Forming Agile Scrum Teams to Manage DITA Infrastructure
PPS
DITA,Single-source, Multi-channel Publishing
PPTX
Michael Priestley - Cross-format, cross-silo: Lightweight DITA for Intelligen...
DITA 1.3: What's New and Different
DITA 1.3: What's New and Different
What's New in DITA 1.3 (Tekom, Nov 2014)
Content Management on Zero Budget: DITA for Small Teams
Overview of DITA 1.3
DITA for Small Teams: An Open Source Approach to DITA Content Management
Doctraineast2008
Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys
DITA on a Shoe String
Using DITAworks for Eclipse Help publishing
RELAX NG and DITA: An Almost Perfect Match
One Tool to Help Them All - Leigh White
What's New in DITA 1.3
Painless XML Authoring?: How DITA Simplifies XML
Reports and DITA Metrics IXIASOFT User Conference 2016
Single Source Publishing: Utilizing XML and DITA
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse?
Forming Agile Scrum Teams to Manage DITA Infrastructure
DITA,Single-source, Multi-channel Publishing
Michael Priestley - Cross-format, cross-silo: Lightweight DITA for Intelligen...
Ad

More from Contrext Solutions (20)

PPTX
Stupid DITA Tricks: After-The-Fact Specialization: Treating Aircraft Manuals ...
PPTX
Loose Leaf Publishing Using Antenna House Formatter and CSS for Pagination
PPTX
Definition of the DITA Glossary: Or How to Get Some Cool Glossary Tools for Free
PPTX
Twisted XSL Tricks: Column Switching for FOP
PDF
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
PPTX
Ki, Qi, Key: The Way of DITA Harmony With Keys and Key References
PPTX
Using CSS Paging to Render DITA Documents
PPTX
Locale-Aware Sorting and Text Handling in the Open Toolkit
PPTX
DITA for Small Teams Workshop (Tekom 2017)
PPTX
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
PPTX
XSLT Magic Tricks with DITA and FrameMaker
PPTX
FrameMaker and the DITA Open Toolkit
PPTX
DITA Reuse Challenges and Response
PPTX
Managing Multiple Open Toolkit Configurations Using git Lightning Talk
PPTX
DITA OT Day 2015 Lightning Talk On The DITA Community Project
PPTX
Poster: Cross-Document Linking in DITA
PPTX
Taking Cross References to the Next Level: Reltables for Non-Topic Elements
PPTX
RELAX NG to DTD and XSD Using the Open Toolkit
PPTX
Dita cross-deliverable-addressing-poster
PPTX
Wek cross-publication-linking
Stupid DITA Tricks: After-The-Fact Specialization: Treating Aircraft Manuals ...
Loose Leaf Publishing Using Antenna House Formatter and CSS for Pagination
Definition of the DITA Glossary: Or How to Get Some Cool Glossary Tools for Free
Twisted XSL Tricks: Column Switching for FOP
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
Ki, Qi, Key: The Way of DITA Harmony With Keys and Key References
Using CSS Paging to Render DITA Documents
Locale-Aware Sorting and Text Handling in the Open Toolkit
DITA for Small Teams Workshop (Tekom 2017)
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
XSLT Magic Tricks with DITA and FrameMaker
FrameMaker and the DITA Open Toolkit
DITA Reuse Challenges and Response
Managing Multiple Open Toolkit Configurations Using git Lightning Talk
DITA OT Day 2015 Lightning Talk On The DITA Community Project
Poster: Cross-Document Linking in DITA
Taking Cross References to the Next Level: Reltables for Non-Topic Elements
RELAX NG to DTD and XSD Using the Open Toolkit
Dita cross-deliverable-addressing-poster
Wek cross-publication-linking

Recently uploaded (20)

PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
"Secure File Sharing Solutions on AWS".pptx
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
Time Tracking Features That Teams and Organizations Actually Need
PDF
Cost to Outsource Software Development in 2025
PDF
Types of Token_ From Utility to Security.pdf
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PPTX
GSA Content Generator Crack (2025 Latest)
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
Visual explanation of Dijkstra's Algorithm using Python
PDF
Microsoft Office 365 Crack Download Free
Wondershare Recoverit Full Crack New Version (Latest 2025)
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
"Secure File Sharing Solutions on AWS".pptx
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Time Tracking Features That Teams and Organizations Actually Need
Cost to Outsource Software Development in 2025
Types of Token_ From Utility to Security.pdf
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
Monitoring Stack: Grafana, Loki & Promtail
Tech Workshop Escape Room Tech Workshop
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
DNT Brochure 2025 – ISV Solutions @ D365
Advanced SystemCare Ultimate Crack + Portable (2025)
Computer Software and OS of computer science of grade 11.pptx
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
GSA Content Generator Crack (2025 Latest)
How to Use SharePoint as an ISO-Compliant Document Management System
Visual explanation of Dijkstra's Algorithm using Python
Microsoft Office 365 Crack Download Free

No Ki Magic: Managing Complex DITA Hyperdocuments

  • 1. No Ki Magic Or Hyperdocument Authoring Link Management Using Git and XQuery in Service of an Abstract Hyperdocument Management Model Applied to DITA Hyperdocuments 8/14/2015 Contrext, LLC 1 Eliot Kimber Contrext, LLC Balisage 2015
  • 2. WHAT AM I TALKING ABOUT? 8/14/2015 Contrext, LLC 2
  • 3. Link Management and Configuration Management 8/14/2015 Contrext, LLC 3
  • 7. The Problems • As an author: What can I link to and how do I address it? • As an authoring tool: What does this indirect address point to? • As a deliverable producer: What is the set of resources I require in order to produce a deliverable from the input publication source? • As a manager: What is the version-specific configuration of this publication in a specific repository access context? 8/14/2015 Contrext, LLC 7
  • 8. The Essential Issue • Given a collection of source components with links among them and managed through asynchronous revision processes, what is the time-specific configuration of those components at any moment in time as viewed by a given agent for a specific purpose? • In DITA terms: When I process a map in a specific access context, what do I see and what can I see? 8/14/2015 Contrext, LLC 8
  • 9. Interlude: A (bit of a) Poem Time present and time past Are both perhaps present in time future, And time future contained in time past. If all time is eternally present All time is unredeemable. What might have been is an abstraction Remaining a perpetual possibility Only in a world of speculation. What might have been and what has been Point to one end, which is always present. … —T.S Eliot, "Four Quartets 1: Burnt Norton" 8/14/2015 Contrext, LLC 9
  • 11. Aikido • A defensive martial art based on blending with an attacker's energy, capturing their balance, and redirecting their energy in order to return them to harmony • Goal of Aikido is ultimately universal peace and harmony • There is no one true way to do Aikido – Aikidosa are expected to develop their own expression and interpretation of Aikido as they develop their skills • It's all about connection 8/14/2015 Contrext, LLC 11
  • 12. DITA • A standard XML application architecture for human- consumed documents • Optimized for interchange and interoperation of content, processing, and DITA-specific knowledge • Distinguishing architectural features: – Specialization: enables controlled extension from base DITA markup vocabulary – Use-by reference: Content components can be used in multiple contexts (DITA maps, content reference) – Indirect addressing: keys and key references – Designed to work entirely from a file system • DITA is all about connection 8/14/2015 Contrext, LLC 12
  • 13. Another Poem If you have not Linked yourself To true emptiness, You will never understand The Art of Peace. —Morihei Ueshiba, The Art of Peace, translated by John Stevens. 8/14/2015 Contrext, LLC 13
  • 14. Direct vs. Indirect Addressing 8/14/2015 Contrext, LLC 14 • Blend and redirect to appropriate target • Harder to learn and execute but more effective • Many options at time of action • Death does not result Indirect addressing • Quick, effective, fragile. • Relatively easy to learn and execute • Predetermined response to a given attack • Death results Direct addressing
  • 15. Indirection Is Necessary For Survival • Direct addressing is preferred for delivery – Fast, uncomplicated, reliable, • Indirect addressing is required for authoring – Flexible, robust, complicated – The link must live to link another day • Allows binding same address to different targets in different use contexts • Without indirection many authoring and configuration use cases cannot be satisfied • Prefer a standard, interoperable way to do indirect addressing 8/14/2015 Contrext, LLC 15
  • 16. Different Use Contexts • Same component used multiple times in the same hyperdocument • Same component used in different hyperdocuments • Same component used in different versions in time of a given hyperdocument 8/14/2015 Contrext, LLC 16 Map 1 Topic A Topic A Map 1 Topic A Map 2 Map 1 V1 Topic A V1 Map 1 V2
  • 17. DITA Maps and Topics • Topics: XML documents that contain content – All content is contained by topics – Topics are intended to be more-or-less context independent • Maps: XML documents containing nothing but links – Links to other maps – Links to topics – Links to non-DITA things 8/14/2015 Contrext, LLC 17 Map 1 Topic A Topic B
  • 18. DITA Keys (No Magic) • Keys are defined in maps • Key definition binds a key name to a resource • Resource can be a topic, a map, or a non-DITA thing (image, Web site, etc.) • Same key name can have different bindings in different maps • A key reference can be used any place a direct URI reference is allowed 8/14/2015 Contrext, LLC 18
  • 19. ABSTRACT VERSION AND LINK MANAGEMENT MODEL 8/14/2015 Contrext, LLC 19
  • 20. Snapshot-Based Configuration Management (SnapCM) • First formulated around 1999 by Heintz, Kimber, et. al. • Combines Heintz' version management insights with Kimber's hyperdocument representation and management insights • Driven in large part by experience with legislative document management workflows and business requirements (bill drafting) – Arguably the hardest set of requirements one could have 8/14/2015 Contrext, LLC 20
  • 21. Branches and Snapshots • A Repository contains Resources • Resources have Versions • A Repository has one or more Branches • A Branch is a linear sequence of Snapshots • A Snapshot points to zero or more Versions – Constraint: no two Versions have the same Resource 8/14/2015 Contrext, LLC 21
  • 22. Configuration Management • By default, can only see versions on Branch – Current Snapshot – Earlier Snapshots • A link to a Resource is resolved using a "resolution policy"" • Default policy is "on Snapshot" • Thus, a Snapshot represents a version-specific configuration of a set of Resources 8/14/2015 Contrext, LLC 22
  • 23. SOLUTION: DITA FOR SMALL TEAMS 8/14/2015 Contrext, LLC 23
  • 24. DITA for Small Teams (DFST) • Show how open-source tools can be combined to create a reasonable DITA authoring and production support system • Four main parts: – Versioned content storage: git, mercurial, etc. – Authoring: oXygen XML, etc. – Production and delivery: Continuous integration + DITA Open Toolkit – Link Management: Under development • Link management is the one missing piece • I'm implementing link management for use in the DFST context 8/14/2015 Contrext, LLC 24
  • 25. Git-Based DFST 8/14/2015 Contrext, LLC 25 Git Repository Git Hooks Link management Processing Authoring Environment Link Managemen t Repository Web App Link Management Deliverable Production CI Server Git Repository DITA OT Git push Deliverabl e Deliverabl e Deliverable
  • 26. Git As the Repository • Git's versioning model close match to the abstract model • Does not, by itself, provide branch-specific access control • Can get the effect by having multiple clones with different branches exposed • Git hooks feed updates to Link Manager 8/14/2015 Contrext, LLC 26
  • 27. Link Management • DITA-specific XQuery application: BaseX, XQuery 3.1 • Maintains where-used index based on links in the source documents • Implements DITA key space construction and key resolution • Fundamentally just data processing • Some tricky bits due to DITA features: – Map trees – Conditional key definitions and map references – Key scopes (DITA 1.3) – Branch filtering (DITA 1.3) 8/14/2015 Contrext, LLC 27
  • 28. Git For Versioning Model • Git branch = SnapCM Branch • Git commit = SnapCM Snapshot • Link management repository mirrors git repository/branch organization • Current implementation only reflects current commit – Could reflect any commits, just costs storage • Git atomic commit of multiple objects allows consistent link management state 8/14/2015 Contrext, LLC 28
  • 29. No Key Magic: Link Management (LM) Database • XQuery database (BaseX) – Heavy dependence on XPath 3.1 (maps) – Would be much less convenient without maps • One top-level collection per git repo/branch pair • Parallel link metadata database with link management "index" • Functions to encapsulate the git nature of the database organization 8/14/2015 Contrext, LLC 29
  • 30. Where-Used Index • Each target doc has a directory in the LM database • Directory contains one or more use records recording details of the linking element • Where-used query: – Is there a directory for the target doc? • No: Not used • Yes: get use records 8/14/2015 Contrext, LLC 30
  • 31. Direct Links • Find all links: //*[@href] • Resolve the addresses • Record use records 8/14/2015 Contrext, LLC 31 <dfst:useRecord xmlns:dfst="http://dita-for-small-teams.org" resourceKey="bL1LeEVFr4lAgv77oEaECA==^1.2" targetDoc="dfst^dfst-sample-project^master/docs/topic-01.dita" usingDoc="dfst^dfst-sample-project^master/docs/pub-02.ditamap" linkType="topicref" linkClass="- map/topicref " linkContext="navtree" format="dita" scope="local"> <title>Publication Two</title> </dfst:useRecord>
  • 32. Indirect Links • Find all maps: /*[contains(@class, ' map/map ')] • Generate resolved maps that reflect directly-referenced submaps—store in LM database. • Construct key space documents from resolved maps. • Use generated IDs to correlate key definitions in resolved maps and keys spaces to content key definitions • Find all indirect links: //*[@keyref] • Resolve indirect links to targets • Record use records 8/14/2015 Contrext, LLC 32
  • 33. Link Management Web App • RESTXQ Web app – Web pages – REST API – Quick and easy to implement • Report on whatever is interesting about the link nature of the content – Where is something used? – What are the links? – Map structures – Dependencies emanating from a given object 8/14/2015 Contrext, LLC 33
  • 34. Demo • Oops, out of time 8/14/2015 Contrext, LLC 34
  • 36. What Was Easy? • Git for versioned hyperdocument source management: direct match to SnapCM model • BaseX: Easy to set up and use for DITA content – Direct support for XML catalogs – RESTXQ implementation – Lightweight installation • Direct address resolution • DITA map resolution (ignored harder bits for now) 8/14/2015 Contrext, LLC 36
  • 37. What Was Hard • Key space construction – I struggled to work with XQuery 3.1 maps – No code authoring support for complex maps • I miss my Java IDE (I am weak and feeble from my dependence on strongly-typed language programming) – Scoped keys add data processing complexity aggravated by my weak map fu • XQuery update does not allow naïve approaches to LM database population 8/14/2015 Contrext, LLC 37
  • 38. Future Work • Finish out DITA key space construction (key scopes, branch filtering, dynamic conditional processing) • Finish out basic link management reporting features • Implement basic REST API for accessing link management information • Docker container packaging for ease of deployment • Tighter integration with authoring tools • Better error reporting for link management data processing • Oh, yeah, documentation… 8/14/2015 Contrext, LLC 38
  • 40. Resources • DITA for Small Teams: https://github.com/dita-for-small-teams • Me: ekimber@contrext.com, http://contrext.com 8/14/2015 Contrext, LLC 40