SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Scoped Keys in
DITA 1.3
(Finally!)
Leigh White
DITA Specialist
leigh.white@ixiasoft.com
Presented at CIDM/DITA NA
April 2015
Me
• Writer, Information Architect
• DITA user since 2007
• Implements and supports the DITA CMS
• Author of DITA for Print
• Contributor to Language of Content Strategy
• Member of
DITA Adoption TC
DITA 1.2: Once upon a time
“The DITA 1.2 key reference facility provides an
indirect addressing mechanism that allows authors
to create references to things without having to
know exactly where or what those things are or will
be in the future.” (from an OASIS DITA Adoption TC
white paper)
WHAT?
Unscoped key (simple) example
<map>
<keydef keys="ot-version">
<topicmeta>
<keywords>
<keyword>1.8</keyword>
</keywords>
</topicmeta>
</keydef>
<topicref href="introduction.xml"/>
</map>
From introduction.xml:
<p>This book was … formatted using the DITA Open Toolkit <ph
keyref="ot-version"/> using some of the same techniques you’ll learn
about here.</p>
GREAT, huh?
But…there was trouble in the key-ngdom
<map>
<title>Using the Widget</title>
<keydef keys="module-name">
<keyword>Widget</keyword>
</keydef>
<topicref href="get_started.xml"/>
</map>
get_started.xml
<p>Now that you have integrated the <ph keyref="module-name">, many new
options are available to you.</p>
<map>
<mapref href="widget.ditamap"/>
<mapref href="gadget.ditamap"/>
</map>
<map>
<title>Using the Gadget</title>
<keydef keys="module-name">
<keyword>Gadget</keyword>
</keydef>
<topicref href="get_started.xml"/>
</map>
There can be only one…
• In DITA 1.2, there can be only one
definition/resolution of a key for an entire
processing scope
• The definition used is the “first” one that the DITA-
OT encounters when processing the map.
• What does “first” mean?
 Long story. Read about it here:
http://dita.xml.org/resource/dita-tc-faq-about-keys.
• The bottom line is you can’t use a topic multiple
times in a deliverable and have a different value
for a given key each time.
The people were angry
And the full promise of keys lay tantalizingly out of
reach
The years passed…
…and DITA 1.3 keyscope appeared
Scoped keys!
• DITA 1.3 supports key definitions at different
locations within a map structure
 Good for deliverables that are comprised of lots of sub-
maps; each map can have its own set of key definitions
 If a topic is re-used in a deliverable, you can specify
different key values depending in which sub-map the
topic appears
 Fully backwards-compatible with DITA 1.2. Existing
maps function exactly as before; they don’t contain any
keyscope attributes
How do they work?
• New attribute “keyscope”
• Used to define a key space
• Can be used on <mapref>, <topicgroup>,
<topichead>, <topicref>
Let’s look at some examples
Example 1: Parallel key spaces
Nested standalone maps:
<map>
<title>Training Courses</title>
<mapref href="widget.ditamap" keyscope="widget"/>
*<keydef keys="module-name"> = Widget
<topicref href="get-started.xml"/>
<mapref href="gadget.ditamap" keyscope="gadget"/>
*<keydef keys="module-name"> = Gadget
<topicref href="get-started.xml"/>
</map>
get_started.xml:
<p>Now that you have integrated the <ph keyref="module-name">, many new options are
available to you.</p>
Multiple instances?
• “If a topic that contains key references is reused in multiple
key scopes within a given root map such that its references
resolve differently in each use context, processors MUST
produce multiple copies of the source topic in resolved
output for each distinct set of effective key definitions that
are referenced by the topic. In such cases, authors can use
the [copy-to] attribute to specify different source URIs for
each reference to a topic.” (From DITA 1.3 spec as of
4/4/2015)
• force-unique build parameter generates copy-to attributes
to duplicate topicref elements. The allowed values are true
and false; the default value is false.
Example 2: Parallel key spaces
Single map, scope definition via topicgroup or topichead:
<map>
<title>Training Courses</title>
<topicgroup keyscope="widget">
*<keydef keys="module-name"> = Widget
<topicref href="get-started.xml"/>
</topicgroup>
<topichead keyscope="gadget" navtitle="Using the Gadget">
*<keydef keys="module-name"> = Gadget
<topicref href="get-started.xml"/>
</topichead>
</map>
*Not the actual syntax; abbreviated to save space
Example 3: Parallel key spaces
Single map, scope definition via topicref:
<map>
<title>Equipment Oil Change Procedures</title>
<topicref href="get-started.xml" keyscope="widget">
*<keydef keys="module-name"> = Widget
</topicref>
<topicref href="get-started.xml" keyscope="gadget">
*<keydef keys="module-name"> = Gadget
</topicref>
</map>
Example 4: Nested key spaces
<map keyscope="scope1">
<map keyscope="scope2">
<topicgroup keyscope="scope3">
<topicref href="topicA.xml"/>
</topicgroup>
</map>
</map>
scope1: module-name="Widget"
scope2: module-name="Gadget"
scope3: module-name="Thingy"
In topicA.xml, key "module-name" resolves to...?
Widget
Which key space wins?
• If a key is defined in both parent and child scopes,
parent definition takes precedence
• Always an implicit root key scope on root map
• Based on existing DITA 1.2 practice where a key
definition in a parent map takes precedence over
same key definition in child maps
 Good arguments for having key definitions in child
scopes override those from parent scopes for references
within that scope
 Could put control of this in the author’s hands via
“precedence”-type attribute but maybe confusing
Example 5: Keys outside of scopes
<map>
<title>Training Courses</title>
<mapref href="widget.ditamap" keyscope="widget"/>
*<keydef keys=“X"/>
*<keydef keys=“Y"/>
<mapref href="gadget.ditamap" keyscope="gadget"/>
*<keydef keys=“X"/>
*<keydef keys=“Z"/>
<topicref href=“topic1.xml”/> <!--uses keys X & Y-->
</map>
•X is redefined per gadget keyscope definition
•Y is considered undefined because it has no definition within gadget
keyscope
•Key definitions don’t carry over from parallel key spaces; they only
“trickle down” from parent key spaces*
*Let me clarify
Y
Example 6: Using keys from other scopes
<map>
<title>Training Courses</title>
<mapref href="widget.ditamap" keyscope="widget"/>
*<keydef keys=“module-name"/>
<topicref href=“get-started.xml"/>
<p>If you also integrate the <ph keyref=“gadget.module-name">, many new options will be
available to you.</p>
<mapref href="gadget.ditamap" keyscope="gadget"/>
*<keydef keys="module-name"/>
<topicref href=“get-started.xml"/>
<p>If you also integrate the <ph keyref=“widget.module-name">, many new options will be
available to you.</p>
</map>
•To reference a key in another scope, include that scope name in the
keyref
•If the key is many scopes deep, specify all of the scope names, from the
top down to the key, relative to the current scope
Scope names and reuse
• Scope names can limit reuse
 Either the context you are reusing in has to have a key
space with the specified name, or
 You have to add a key space with that name to the
context for the sake of resolving the key
• Otherwise, you have an undefined key
Example 7: Cross-deliverable linking
• Basic idea: define a root map as a key space and
allow a topic within another root map to link to a
key within that key space
• One use case: root map A creates a help system;
root map B creates a separate help system. You
want to create links between topics in the two help
systems.
• Whether or not a cross-deliverable reference
becomes an active link depends on processor
 DITA 1.3 spec doesn't define how cross-deliverable links
should be handled by processors
Example 7: Cross-deliverable linking
widget.ditamap:
<map>
<title>Widget Online Help</title>
<mapref href="gadget.ditamap" scope="peer" keyscope="gadget"/>
<topicref href="getting_started_widget.dita"/>
</map>
gadget.ditamap:
<map>
<title>Gadget Online Help</title>
<keydef keys="integ-gadget" href="integrating_gadget.dita"/>
</map>
getting_started_widget.dita:
<topic id="getstartwidget">
<title>Getting started with the Widget</title>
<body>
<p>If you choose to <xref keyref="gadget.integ-gadget">integrate the Gadget
module</xref>, many more options will be available to you.</p>
</body>
</topic>
Questions? Comments?
leigh.white@ixiasoft.com

Contenu connexe

Tendances

A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model abodeltae
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flowKnoldus Inc.
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideRohit Arora
 
Introducing Bounded Contexts in a monolithic application
Introducing  Bounded Contexts  in a  monolithic applicationIntroducing  Bounded Contexts  in a  monolithic application
Introducing Bounded Contexts in a monolithic applicationRobertBaelde1
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationOğuzhan Soykan
 
Branching and Merging Practices
Branching and Merging Practices Branching and Merging Practices
Branching and Merging Practices Rajesh Kumar
 
Coding Best Practices
Coding Best PracticesCoding Best Practices
Coding Best Practicesmh_azad
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to JavascriptSeble Nigussie
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentationAyanaRukasar
 
The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1Apigee | Google Cloud
 
Illustration (example) mode
Illustration (example) modeIllustration (example) mode
Illustration (example) modebswetland
 

Tendances (20)

A successful Git branching model
A successful Git branching model A successful Git branching model
A successful Git branching model
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Introduction to git flow
Introduction to git flowIntroduction to git flow
Introduction to git flow
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
 
Introducing Bounded Contexts in a monolithic application
Introducing  Bounded Contexts  in a  monolithic applicationIntroducing  Bounded Contexts  in a  monolithic application
Introducing Bounded Contexts in a monolithic application
 
HTML5
HTML5HTML5
HTML5
 
Git training v10
Git training v10Git training v10
Git training v10
 
HTML5
HTML5 HTML5
HTML5
 
Html form tag
Html form tagHtml form tag
Html form tag
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Html 5
Html 5Html 5
Html 5
 
Branching and Merging Practices
Branching and Merging Practices Branching and Merging Practices
Branching and Merging Practices
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Liferay
LiferayLiferay
Liferay
 
Coding Best Practices
Coding Best PracticesCoding Best Practices
Coding Best Practices
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentation
 
The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1The API Facade Pattern: Overview - Episode 1
The API Facade Pattern: Overview - Episode 1
 
Illustration (example) mode
Illustration (example) modeIllustration (example) mode
Illustration (example) mode
 

Similaire à DITA 1.3 Keyscopes

What's New in DITA 1.3
What's New in DITA 1.3What's New in DITA 1.3
What's New in DITA 1.3IXIASOFT
 
Puppet Design Patterns
Puppet Design PatternsPuppet Design Patterns
Puppet Design PatternsDavid Danzilio
 
Optimizing Content Reuse with DITA
Optimizing Content Reuse with DITAOptimizing Content Reuse with DITA
Optimizing Content Reuse with DITAIXIASOFT
 
Introduction To Information Modeling With DITA
Introduction To Information Modeling With DITAIntroduction To Information Modeling With DITA
Introduction To Information Modeling With DITAScott Abel
 
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse?
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse? TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse?
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse? IXIASOFT
 
Responsive Zen
Responsive ZenResponsive Zen
Responsive Zenslinky830
 
Lecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptxLecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptxAyeCS11
 
Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017Atenea tech
 
AAT LOD Microthesauri
AAT LOD MicrothesauriAAT LOD Microthesauri
AAT LOD MicrothesauriMarcia Zeng
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpTake the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpAlena Holligan
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magentohainutemicute
 
What's New in DITA 1.3 (Tekom, Nov 2014)
What's New in DITA 1.3 (Tekom, Nov 2014)What's New in DITA 1.3 (Tekom, Nov 2014)
What's New in DITA 1.3 (Tekom, Nov 2014)Contrext Solutions
 
Power Theming
Power ThemingPower Theming
Power Themingdrkdn
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial EnAnkur Dongre
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial EnAnkur Dongre
 
The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017Michael Miles
 
The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202Mahmoud Samir Fayed
 
Drupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of FrontendDrupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of FrontendAcquia
 

Similaire à DITA 1.3 Keyscopes (20)

What's New in DITA 1.3
What's New in DITA 1.3What's New in DITA 1.3
What's New in DITA 1.3
 
Developing dita maps
Developing dita mapsDeveloping dita maps
Developing dita maps
 
Puppet Design Patterns
Puppet Design PatternsPuppet Design Patterns
Puppet Design Patterns
 
Optimizing Content Reuse with DITA
Optimizing Content Reuse with DITAOptimizing Content Reuse with DITA
Optimizing Content Reuse with DITA
 
Introduction To Information Modeling With DITA
Introduction To Information Modeling With DITAIntroduction To Information Modeling With DITA
Introduction To Information Modeling With DITA
 
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse?
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse? TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse?
TC Dojo Open Session: Are You Getting the Most Out of DITA Content Reuse?
 
Responsive Zen
Responsive ZenResponsive Zen
Responsive Zen
 
Lecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptxLecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptx
 
Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017Layout discovery. Drupal Summer Barcelona 2017
Layout discovery. Drupal Summer Barcelona 2017
 
AAT LOD Microthesauri
AAT LOD MicrothesauriAAT LOD Microthesauri
AAT LOD Microthesauri
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpTake the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphp
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 
What's New in DITA 1.3 (Tekom, Nov 2014)
What's New in DITA 1.3 (Tekom, Nov 2014)What's New in DITA 1.3 (Tekom, Nov 2014)
What's New in DITA 1.3 (Tekom, Nov 2014)
 
Power Theming
Power ThemingPower Theming
Power Theming
 
Day 1.pdf
Day 1.pdfDay 1.pdf
Day 1.pdf
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017
 
The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202
 
Drupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of FrontendDrupal 8 Theme System: The Backend of Frontend
Drupal 8 Theme System: The Backend of Frontend
 

Plus de Leigh White

The Content Revolution: Managing the Move to a CCMS
The Content Revolution: Managing the Move to a CCMSThe Content Revolution: Managing the Move to a CCMS
The Content Revolution: Managing the Move to a CCMSLeigh White
 
The Elusive Promise of Reuse
The Elusive Promise of ReuseThe Elusive Promise of Reuse
The Elusive Promise of ReuseLeigh White
 
To CMS or Not to CMS?
To CMS or Not to CMS?To CMS or Not to CMS?
To CMS or Not to CMS?Leigh White
 
Making the Mental Shift to Topic-Based Authoring and a CMS
Making the Mental Shift to Topic-Based Authoring and a CMSMaking the Mental Shift to Topic-Based Authoring and a CMS
Making the Mental Shift to Topic-Based Authoring and a CMSLeigh White
 
Information Architecture Explained
Information Architecture ExplainedInformation Architecture Explained
Information Architecture ExplainedLeigh White
 
Estimating time-tracking
Estimating time-trackingEstimating time-tracking
Estimating time-trackingLeigh White
 
Custom PDFs from the DITA OT
Custom PDFs from the DITA OTCustom PDFs from the DITA OT
Custom PDFs from the DITA OTLeigh White
 

Plus de Leigh White (8)

The Content Revolution: Managing the Move to a CCMS
The Content Revolution: Managing the Move to a CCMSThe Content Revolution: Managing the Move to a CCMS
The Content Revolution: Managing the Move to a CCMS
 
The Elusive Promise of Reuse
The Elusive Promise of ReuseThe Elusive Promise of Reuse
The Elusive Promise of Reuse
 
To CMS or Not to CMS?
To CMS or Not to CMS?To CMS or Not to CMS?
To CMS or Not to CMS?
 
Making the Mental Shift to Topic-Based Authoring and a CMS
Making the Mental Shift to Topic-Based Authoring and a CMSMaking the Mental Shift to Topic-Based Authoring and a CMS
Making the Mental Shift to Topic-Based Authoring and a CMS
 
Information Architecture Explained
Information Architecture ExplainedInformation Architecture Explained
Information Architecture Explained
 
Taxonomy
TaxonomyTaxonomy
Taxonomy
 
Estimating time-tracking
Estimating time-trackingEstimating time-tracking
Estimating time-tracking
 
Custom PDFs from the DITA OT
Custom PDFs from the DITA OTCustom PDFs from the DITA OT
Custom PDFs from the DITA OT
 

Dernier

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 

Dernier (20)

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 

DITA 1.3 Keyscopes

  • 1. Scoped Keys in DITA 1.3 (Finally!) Leigh White DITA Specialist leigh.white@ixiasoft.com Presented at CIDM/DITA NA April 2015
  • 2. Me • Writer, Information Architect • DITA user since 2007 • Implements and supports the DITA CMS • Author of DITA for Print • Contributor to Language of Content Strategy • Member of DITA Adoption TC
  • 3. DITA 1.2: Once upon a time “The DITA 1.2 key reference facility provides an indirect addressing mechanism that allows authors to create references to things without having to know exactly where or what those things are or will be in the future.” (from an OASIS DITA Adoption TC white paper) WHAT?
  • 4. Unscoped key (simple) example <map> <keydef keys="ot-version"> <topicmeta> <keywords> <keyword>1.8</keyword> </keywords> </topicmeta> </keydef> <topicref href="introduction.xml"/> </map> From introduction.xml: <p>This book was … formatted using the DITA Open Toolkit <ph keyref="ot-version"/> using some of the same techniques you’ll learn about here.</p> GREAT, huh?
  • 5. But…there was trouble in the key-ngdom <map> <title>Using the Widget</title> <keydef keys="module-name"> <keyword>Widget</keyword> </keydef> <topicref href="get_started.xml"/> </map> get_started.xml <p>Now that you have integrated the <ph keyref="module-name">, many new options are available to you.</p> <map> <mapref href="widget.ditamap"/> <mapref href="gadget.ditamap"/> </map> <map> <title>Using the Gadget</title> <keydef keys="module-name"> <keyword>Gadget</keyword> </keydef> <topicref href="get_started.xml"/> </map>
  • 6. There can be only one… • In DITA 1.2, there can be only one definition/resolution of a key for an entire processing scope • The definition used is the “first” one that the DITA- OT encounters when processing the map. • What does “first” mean?  Long story. Read about it here: http://dita.xml.org/resource/dita-tc-faq-about-keys. • The bottom line is you can’t use a topic multiple times in a deliverable and have a different value for a given key each time.
  • 7. The people were angry And the full promise of keys lay tantalizingly out of reach
  • 9. …and DITA 1.3 keyscope appeared
  • 10. Scoped keys! • DITA 1.3 supports key definitions at different locations within a map structure  Good for deliverables that are comprised of lots of sub- maps; each map can have its own set of key definitions  If a topic is re-used in a deliverable, you can specify different key values depending in which sub-map the topic appears  Fully backwards-compatible with DITA 1.2. Existing maps function exactly as before; they don’t contain any keyscope attributes
  • 11. How do they work? • New attribute “keyscope” • Used to define a key space • Can be used on <mapref>, <topicgroup>, <topichead>, <topicref> Let’s look at some examples
  • 12. Example 1: Parallel key spaces Nested standalone maps: <map> <title>Training Courses</title> <mapref href="widget.ditamap" keyscope="widget"/> *<keydef keys="module-name"> = Widget <topicref href="get-started.xml"/> <mapref href="gadget.ditamap" keyscope="gadget"/> *<keydef keys="module-name"> = Gadget <topicref href="get-started.xml"/> </map> get_started.xml: <p>Now that you have integrated the <ph keyref="module-name">, many new options are available to you.</p>
  • 13. Multiple instances? • “If a topic that contains key references is reused in multiple key scopes within a given root map such that its references resolve differently in each use context, processors MUST produce multiple copies of the source topic in resolved output for each distinct set of effective key definitions that are referenced by the topic. In such cases, authors can use the [copy-to] attribute to specify different source URIs for each reference to a topic.” (From DITA 1.3 spec as of 4/4/2015) • force-unique build parameter generates copy-to attributes to duplicate topicref elements. The allowed values are true and false; the default value is false.
  • 14. Example 2: Parallel key spaces Single map, scope definition via topicgroup or topichead: <map> <title>Training Courses</title> <topicgroup keyscope="widget"> *<keydef keys="module-name"> = Widget <topicref href="get-started.xml"/> </topicgroup> <topichead keyscope="gadget" navtitle="Using the Gadget"> *<keydef keys="module-name"> = Gadget <topicref href="get-started.xml"/> </topichead> </map> *Not the actual syntax; abbreviated to save space
  • 15. Example 3: Parallel key spaces Single map, scope definition via topicref: <map> <title>Equipment Oil Change Procedures</title> <topicref href="get-started.xml" keyscope="widget"> *<keydef keys="module-name"> = Widget </topicref> <topicref href="get-started.xml" keyscope="gadget"> *<keydef keys="module-name"> = Gadget </topicref> </map>
  • 16. Example 4: Nested key spaces <map keyscope="scope1"> <map keyscope="scope2"> <topicgroup keyscope="scope3"> <topicref href="topicA.xml"/> </topicgroup> </map> </map> scope1: module-name="Widget" scope2: module-name="Gadget" scope3: module-name="Thingy" In topicA.xml, key "module-name" resolves to...? Widget
  • 17. Which key space wins? • If a key is defined in both parent and child scopes, parent definition takes precedence • Always an implicit root key scope on root map • Based on existing DITA 1.2 practice where a key definition in a parent map takes precedence over same key definition in child maps  Good arguments for having key definitions in child scopes override those from parent scopes for references within that scope  Could put control of this in the author’s hands via “precedence”-type attribute but maybe confusing
  • 18. Example 5: Keys outside of scopes <map> <title>Training Courses</title> <mapref href="widget.ditamap" keyscope="widget"/> *<keydef keys=“X"/> *<keydef keys=“Y"/> <mapref href="gadget.ditamap" keyscope="gadget"/> *<keydef keys=“X"/> *<keydef keys=“Z"/> <topicref href=“topic1.xml”/> <!--uses keys X & Y--> </map> •X is redefined per gadget keyscope definition •Y is considered undefined because it has no definition within gadget keyscope •Key definitions don’t carry over from parallel key spaces; they only “trickle down” from parent key spaces* *Let me clarify Y
  • 19. Example 6: Using keys from other scopes <map> <title>Training Courses</title> <mapref href="widget.ditamap" keyscope="widget"/> *<keydef keys=“module-name"/> <topicref href=“get-started.xml"/> <p>If you also integrate the <ph keyref=“gadget.module-name">, many new options will be available to you.</p> <mapref href="gadget.ditamap" keyscope="gadget"/> *<keydef keys="module-name"/> <topicref href=“get-started.xml"/> <p>If you also integrate the <ph keyref=“widget.module-name">, many new options will be available to you.</p> </map> •To reference a key in another scope, include that scope name in the keyref •If the key is many scopes deep, specify all of the scope names, from the top down to the key, relative to the current scope
  • 20. Scope names and reuse • Scope names can limit reuse  Either the context you are reusing in has to have a key space with the specified name, or  You have to add a key space with that name to the context for the sake of resolving the key • Otherwise, you have an undefined key
  • 21. Example 7: Cross-deliverable linking • Basic idea: define a root map as a key space and allow a topic within another root map to link to a key within that key space • One use case: root map A creates a help system; root map B creates a separate help system. You want to create links between topics in the two help systems. • Whether or not a cross-deliverable reference becomes an active link depends on processor  DITA 1.3 spec doesn't define how cross-deliverable links should be handled by processors
  • 22. Example 7: Cross-deliverable linking widget.ditamap: <map> <title>Widget Online Help</title> <mapref href="gadget.ditamap" scope="peer" keyscope="gadget"/> <topicref href="getting_started_widget.dita"/> </map> gadget.ditamap: <map> <title>Gadget Online Help</title> <keydef keys="integ-gadget" href="integrating_gadget.dita"/> </map> getting_started_widget.dita: <topic id="getstartwidget"> <title>Getting started with the Widget</title> <body> <p>If you choose to <xref keyref="gadget.integ-gadget">integrate the Gadget module</xref>, many more options will be available to you.</p> </body> </topic>

Notes de l'éditeur

  1. Is there an implicit @copy-to in this use case?
  2. You can’t define a key at the root level with the intention that it serve as a “fallback” when the key is not defined at a lower level. The root level definition will always take precedence over lower-level definitions.