SlideShare une entreprise Scribd logo
1  sur  21
Managing Deliverable-Specific Link Anchors:
New Suggested Best Practice for Keys
How to define and maintain publicly-
linkable anchors in deliverables
produced from DITA source
4/29/2015 Contrext, LLC 1
Eliot Kimber
Contrext, LLC
DITA North America 2015
About the Author
• Independent consultant focusing on DITA analysis,
design, and implementation
• Doing SGML and XML for cough 30 years cough
• Founding member of the DITA Technical Committee
• Founding member of the XML Working Group
• Co-editor of HyTime standard (ISO/IEC 10744)
• Primary developer and founder of the DITA for
Publishers project
• Author of DITA for Practitioners, Vol 1 (XML Press)
4/29/2015 Contrext, LLC 2
Agenda
• What are "public anchors"?
• Navigation vs resource keys
• Key definition and usage best practice
• Generating public deliverable anchors
4/29/2015 Contrext, LLC 3
Executive Summary
• Use keys for everything
• Principle: Exactly one URI reference to each
resource across all maps
• Put unique keys on each navigation topicref
you want to be publicly linkable or xref to
• Use navigation keys to determine deliverable
anchors
• Don’t change navigation keys unnecessarily
4/29/2015 Contrext, LLC 4
What are Public Anchors?
• Anything that can be linked to from outside the
deliverable:
– HTML files
– HTML @id values
– PDF named destinations
– Help topic IDs
• Need to be reliably persistent
• Should not change from release to release for the
same logical component (topic or element)
4/29/2015 Contrext, LLC 5
Navigation vs Resource keys
• Two types of topicrefs:
– "normal": contribute to the navigation tree or to
reltables
– "resource-only": Establish a dependency on a
resource but don’t put it in the navigation tree
• @processing-role on topicref:
– processing-role="normal"
– processing-role="resource-only"
• <keydef> is resource-only by default
4/29/2015 Contrext, LLC 6
Resource-Only Keys
• Establish context-independent keys for topics
• Can be unique across all maps if required or
map- or scope-specific
• Key-defining maps serve as catalogs of topics
or other resources (images, etc.)
• Should be used for conrefs
• Not useful for cross reference targets: no
navigation use context
4/29/2015 Contrext, LLC 7
Normal-Role (Navigation) Key
• Identifies the unique uses of a given topic
• Only appropriate target for cross references
• By the nature of keys, are globally unique
within a single root map.
4/29/2015 Contrext, LLC 8
Key Definition and Usage Best
Practice
• Define resource-only keys in standalone "key-
definition" maps
<keydef keys="topic-000123r5"
href="topics/t-57623-934.dita"/>
• Use resource-only keys from navigation topicrefs:
<chapter keys="chap-01"
keyref="topic-000123r5"/>
• Put keys on either all navigation topicrefs or
• Put keys on all navigation topicrefs you want to
be publicly linkable
4/29/2015 Contrext, LLC 9
Exactly One URI Reference For
Each Resource
• For images and external Web resources:
– Always define a key
– Refer to the key (and only the key) from topics
• For topics that are or are likely to be reused:
– Define resource-only keys in a separate key-
defining map
• For topics that are only ever used in a single
map:
– Put @keys on the topicref to the topic
4/29/2015 Contrext, LLC 10
Keys for Single-Use Topics
• A topic used only once across all maps may not justify the
cost of separate resource-only key definition
• Define two keys on the topicref:
– One that reflects that use of the topic: "ch-01-ss-01"
– One that represents the topic in any context: "topic-1235"
• Example:
<topicref
keys="installation topic-1234"
href="topics/topic-1234.dita"
/>
• If the topic is ever reused, create resource-only topicref
and move context-independent key to that definition
4/29/2015 Contrext, LLC 11
NOTE: DITA OT Limitation
• As of OT 2.1 and earlier:
– @copy-to on navigation topicrefs that use keyref doesn't
work
– Copy-to processing is done before key space construction
• Fixing this will require rethinking entire preprocessing
approach
– Rethink required for DITA 1.3 anyway
– Non-trivial to implement
• Workaround: Use separate keydefs for each required copy-to:
<keydef keys="key-01"
href="topic-01.dita"/>
<keydef keys="key-01-copy-to-c01s01"
href="topic-01.dita"
copy-to="ch01-sec01.dita"/>
…
<topicref keys="ch01-sec01" keyref="key-01-copy-to-c01s01"/>
4/29/2015 Contrext, LLC 12
Example: Publication root map
<map>
<title>Prod1 Product Guide</title>
<mapref href="keysdefs-01.ditamap"/>
<topicref keys="pubroot"
keyref="topic-ABC001"
>
<topicref keys="chapter-01"
keyref="topic-ABC123"
>
<topicref keys="ch01-overview"
keyref="topic-ABC456"
>
</topicref>
…
</topicref>
…
</map>
4/29/2015 Contrext, LLC 13
Example: keydefs-01.ditamap
<map>
<title>Keydefs for Group 1</title>
<keydef keys="topic-ABC001"
href="topic-ABC001.dita"
/>
<keydef keys="topic-ABC002"
href="topic-ABC002.dita"
/>
…
</map>
4/29/2015 Contrext, LLC 14
Cross Reference Example
<p>See <xref keyref="chapter-01"/>…
<p>See <xref keyref="chapter-01/fig-01"/>
4/29/2015 Contrext, LLC 15
Generating Public Deliverable
Anchors
• Two basic use cases:
– Multi-file outputs (HTML, online help)
– Monolithic outputs (PDF, EPUB, etc.)
• General problem: anchors for non-topic
elements
– Only unique within a single topic
– Not necessarily unique within result documents
• Must combine keys with element IDs in some
cases
4/29/2015 Contrext, LLC 16
Multi-File Outputs (HTML)
• Use navigation keys to determine result
filenames:
<topicref keys="chapter-01"
keyref="topic-ABC123"
>
becomes
chapter-01.html
• Use navigation key plus element ID to
construct in-document anchors
4/29/2015 Contrext, LLC 17
Monolithic Outputs (PDF)
• Use navigation key for topic anchors
• Use navigation key+element ID for non-topic
anchors
• For PDF, need to use a separator that uses
legal URL characters, e.g. "_._", "-.-"
– Needs to be more than "-" or "_" to avoid
accidental collisions
4/29/2015 Contrext, LLC 18
Preprocessing Extensions
• DITA Community project
• Extends base preprocessing to add @copy-to
to topicrefs as required
– Second and subsequent reference to a given topic
– Will eventually use keys for the filename value
• Some subtle complexities
• Haven't had time to implement yet
4/29/2015 Contrext, LLC 19
Summary
• Always use keys for all references
– To topics
– To images
– To peer maps (DITA 1.3)
• Put keys on navigation topicrefs
• Crossrefs should point to navigation keys
• Use navigation keys to generate anchors in
deliverables
4/29/2015 Contrext, LLC 20
Resources
• Paper: http://github.io/dita-
community/paper-dita-keys-as-public-anchor-
ids
• Preprocessing extensions:
https://github.com/dita-community/org.dita-
community.preprocess-extensions
• Me: ekimber@contrext.com,
http://contrext.com
4/29/2015 Contrext, LLC 21

Contenu connexe

Tendances

Tendances (6)

The Evolution of DITAs
The Evolution of DITAsThe Evolution of DITAs
The Evolution of DITAs
 
4D Pubs - Distributed Dynamic Document Dsplay
4D Pubs - Distributed Dynamic Document Dsplay4D Pubs - Distributed Dynamic Document Dsplay
4D Pubs - Distributed Dynamic Document Dsplay
 
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet RequirementsDITA Quick Start Webinar: Defining Your Style Sheet Requirements
DITA Quick Start Webinar: Defining Your Style Sheet Requirements
 
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
 
DITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information ArchitectureDITA Quick Start Webinar Series: Getting Started with Information Architecture
DITA Quick Start Webinar Series: Getting Started with Information Architecture
 
REA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and AmundsenREA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and Amundsen
 

En vedette

En vedette (10)

The DITA Iceberg, DITA Europe 2016
The DITA Iceberg, DITA Europe 2016The DITA Iceberg, DITA Europe 2016
The DITA Iceberg, DITA Europe 2016
 
Towards an Agile Authoring methodology: Learning from Lean (AgileTheDocs Conf...
Towards an Agile Authoring methodology: Learning from Lean (AgileTheDocs Conf...Towards an Agile Authoring methodology: Learning from Lean (AgileTheDocs Conf...
Towards an Agile Authoring methodology: Learning from Lean (AgileTheDocs Conf...
 
AgileTheDocs_2016London_Stella Crowhurst Jamie Measures Worldpay
AgileTheDocs_2016London_Stella Crowhurst Jamie Measures WorldpayAgileTheDocs_2016London_Stella Crowhurst Jamie Measures Worldpay
AgileTheDocs_2016London_Stella Crowhurst Jamie Measures Worldpay
 
The Trip to DITA
The Trip to DITAThe Trip to DITA
The Trip to DITA
 
Poster: Cross-Document Linking in DITA
Poster: Cross-Document Linking in DITAPoster: Cross-Document Linking in DITA
Poster: Cross-Document Linking in 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?
 
Optimizing DITA Content for Search Engine Optimization tekom tcworld 2016
Optimizing DITA Content for Search Engine Optimization tekom tcworld 2016Optimizing DITA Content for Search Engine Optimization tekom tcworld 2016
Optimizing DITA Content for Search Engine Optimization tekom tcworld 2016
 
Dita 4 Dummies
Dita 4 DummiesDita 4 Dummies
Dita 4 Dummies
 
Using DITA without becoming a Geek
Using DITA without becoming a GeekUsing DITA without becoming a Geek
Using DITA without becoming a Geek
 
Optimizing Content Reuse with DITA
Optimizing Content Reuse with DITAOptimizing Content Reuse with DITA
Optimizing Content Reuse with DITA
 

Similaire à Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys

Similaire à Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys (20)

Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys
Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for KeysManaging Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys
Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys
 
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)
 
DITA 1.3: What's New and Different
DITA 1.3: What's New and DifferentDITA 1.3: What's New and Different
DITA 1.3: What's New and Different
 
Optimizing Content Reuse with DITA - LavaCon Webinar with Keith Schengili-Rob...
Optimizing Content Reuse with DITA - LavaCon Webinar with Keith Schengili-Rob...Optimizing Content Reuse with DITA - LavaCon Webinar with Keith Schengili-Rob...
Optimizing Content Reuse with DITA - LavaCon Webinar with Keith Schengili-Rob...
 
Ki, Qi, Key: The Way of DITA Harmony With Keys and Key References
Ki, Qi, Key: The Way of DITA Harmony With Keys and Key ReferencesKi, Qi, Key: The Way of DITA Harmony With Keys and Key References
Ki, Qi, Key: The Way of DITA Harmony With Keys and Key References
 
XPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 WebinarXPages Application Layout Control - TLCC March, 2014 Webinar
XPages Application Layout Control - TLCC March, 2014 Webinar
 
Application Layout Control
Application Layout ControlApplication Layout Control
Application Layout Control
 
Suite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp OutputSuite Labs: Generating SuiteHelp Output
Suite Labs: Generating SuiteHelp Output
 
They Worked Before, What Happened? Understanding DITA Cross-Book Links
They Worked Before, What Happened? Understanding DITA Cross-Book Links They Worked Before, What Happened? Understanding DITA Cross-Book Links
They Worked Before, What Happened? Understanding DITA Cross-Book Links
 
Guerilla Human Computer Interaction and Customer Based Design
Guerilla Human Computer Interaction and Customer Based DesignGuerilla Human Computer Interaction and Customer Based Design
Guerilla Human Computer Interaction and Customer Based Design
 
DITA on a Shoe String
DITA on a Shoe StringDITA on a Shoe String
DITA on a Shoe String
 
French Scrum User Group @Google - The Agile and Open Source Way
French Scrum User Group @Google - The Agile and Open Source WayFrench Scrum User Group @Google - The Agile and Open Source Way
French Scrum User Group @Google - The Agile and Open Source Way
 
Rup
RupRup
Rup
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
 
Crm saturday madrid 2017 razwan - d365 solution release management
Crm saturday madrid 2017   razwan - d365 solution release managementCrm saturday madrid 2017   razwan - d365 solution release management
Crm saturday madrid 2017 razwan - d365 solution release management
 
Passport to DITA Implementation CIDM April 2017
Passport to DITA Implementation CIDM April 2017Passport to DITA Implementation CIDM April 2017
Passport to DITA Implementation CIDM April 2017
 
Making Product Development Agile
Making Product Development AgileMaking Product Development Agile
Making Product Development Agile
 
Pre-Conference Course: UX and Agile: Making a Great Experience -
Pre-Conference Course: UX and Agile: Making a Great Experience - Pre-Conference Course: UX and Agile: Making a Great Experience -
Pre-Conference Course: UX and Agile: Making a Great Experience -
 
DITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part IDITA Quick Start for Authors - Part I
DITA Quick Start for Authors - Part I
 
Repairing with DITA - Don Day
Repairing with DITA -  Don DayRepairing with DITA -  Don Day
Repairing with DITA - Don Day
 

Plus de Contrext Solutions

Plus de Contrext Solutions (20)

Stupid DITA Tricks: After-The-Fact Specialization: Treating Aircraft Manuals ...
Stupid DITA Tricks:After-The-Fact Specialization: Treating Aircraft Manuals ...Stupid DITA Tricks:After-The-Fact Specialization: Treating Aircraft Manuals ...
Stupid DITA Tricks: After-The-Fact Specialization: Treating Aircraft Manuals ...
 
Loose Leaf Publishing Using Antenna House Formatter and CSS for Pagination
Loose Leaf Publishing Using Antenna House Formatter and CSS for PaginationLoose Leaf Publishing Using Antenna House Formatter and CSS for Pagination
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
Definition of the DITA Glossary: Or How to Get Some Cool Glossary Tools for FreeDefinition of the DITA Glossary: Or How to Get Some Cool Glossary Tools for Free
Definition of the DITA Glossary: Or How to Get Some Cool Glossary Tools for Free
 
Twisted XSL Tricks: Column Switching for FOP
Twisted XSL Tricks: Column Switching for FOPTwisted XSL Tricks: Column Switching for FOP
Twisted XSL Tricks: Column Switching for FOP
 
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITACan I Have a Word: Managing Shared Glossaries and References to Terms With DITA
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
 
Content Management on Zero Budget: DITA for Small Teams
Content Management on Zero Budget: DITA for Small TeamsContent Management on Zero Budget: DITA for Small Teams
Content Management on Zero Budget: DITA for Small Teams
 
Using CSS Paging to Render DITA Documents
Using CSS Paging to Render DITA DocumentsUsing CSS Paging to Render DITA Documents
Using CSS Paging to Render DITA Documents
 
Locale-Aware Sorting and Text Handling in the Open Toolkit
Locale-Aware Sorting and Text Handling in the Open ToolkitLocale-Aware Sorting and Text Handling in the Open Toolkit
Locale-Aware Sorting and Text Handling in the Open Toolkit
 
DITA for Small Teams Workshop (Tekom 2017)
DITA for Small Teams Workshop (Tekom 2017)DITA for Small Teams Workshop (Tekom 2017)
DITA for Small Teams Workshop (Tekom 2017)
 
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITACan I Have a Word: Managing Shared Glossaries and References to Terms With DITA
Can I Have a Word: Managing Shared Glossaries and References to Terms With DITA
 
XSLT Magic Tricks with DITA and FrameMaker
XSLT Magic Tricks with DITA and FrameMakerXSLT Magic Tricks with DITA and FrameMaker
XSLT Magic Tricks with DITA and FrameMaker
 
FrameMaker and the DITA Open Toolkit
FrameMaker and the DITA Open ToolkitFrameMaker and the DITA Open Toolkit
FrameMaker and the DITA Open Toolkit
 
DITA Reuse Challenges and Response
DITA Reuse Challenges and ResponseDITA Reuse Challenges and Response
DITA Reuse Challenges and Response
 
RELAX NG and DITA: An Almost Perfect Match
RELAX NG and DITA: An Almost Perfect MatchRELAX NG and DITA: An Almost Perfect Match
RELAX NG and DITA: An Almost Perfect Match
 
Managing Multiple Open Toolkit Configurations Using git Lightning Talk
Managing Multiple Open Toolkit Configurations Using git Lightning TalkManaging Multiple Open Toolkit Configurations Using git Lightning Talk
Managing Multiple Open Toolkit Configurations Using git Lightning Talk
 
DITA OT Day 2015 Lightning Talk On The DITA Community Project
DITA OT Day 2015 Lightning Talk On The DITA Community ProjectDITA OT Day 2015 Lightning Talk On The DITA Community Project
DITA OT Day 2015 Lightning Talk On The DITA Community Project
 
RELAX NG to DTD and XSD Using the Open Toolkit
RELAX NG to DTD and XSD Using the Open ToolkitRELAX NG to DTD and XSD Using the Open Toolkit
RELAX NG to DTD and XSD Using the Open Toolkit
 
Dita cross-deliverable-addressing-poster
Dita cross-deliverable-addressing-posterDita cross-deliverable-addressing-poster
Dita cross-deliverable-addressing-poster
 
Wek cross-publication-linking
Wek cross-publication-linkingWek cross-publication-linking
Wek cross-publication-linking
 
General Architecture for Generation of Slide Presentations
General Architecture for Generation of Slide PresentationsGeneral Architecture for Generation of Slide Presentations
General Architecture for Generation of Slide Presentations
 

Dernier

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Dernier (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys

  • 1. Managing Deliverable-Specific Link Anchors: New Suggested Best Practice for Keys How to define and maintain publicly- linkable anchors in deliverables produced from DITA source 4/29/2015 Contrext, LLC 1 Eliot Kimber Contrext, LLC DITA North America 2015
  • 2. About the Author • Independent consultant focusing on DITA analysis, design, and implementation • Doing SGML and XML for cough 30 years cough • Founding member of the DITA Technical Committee • Founding member of the XML Working Group • Co-editor of HyTime standard (ISO/IEC 10744) • Primary developer and founder of the DITA for Publishers project • Author of DITA for Practitioners, Vol 1 (XML Press) 4/29/2015 Contrext, LLC 2
  • 3. Agenda • What are "public anchors"? • Navigation vs resource keys • Key definition and usage best practice • Generating public deliverable anchors 4/29/2015 Contrext, LLC 3
  • 4. Executive Summary • Use keys for everything • Principle: Exactly one URI reference to each resource across all maps • Put unique keys on each navigation topicref you want to be publicly linkable or xref to • Use navigation keys to determine deliverable anchors • Don’t change navigation keys unnecessarily 4/29/2015 Contrext, LLC 4
  • 5. What are Public Anchors? • Anything that can be linked to from outside the deliverable: – HTML files – HTML @id values – PDF named destinations – Help topic IDs • Need to be reliably persistent • Should not change from release to release for the same logical component (topic or element) 4/29/2015 Contrext, LLC 5
  • 6. Navigation vs Resource keys • Two types of topicrefs: – "normal": contribute to the navigation tree or to reltables – "resource-only": Establish a dependency on a resource but don’t put it in the navigation tree • @processing-role on topicref: – processing-role="normal" – processing-role="resource-only" • <keydef> is resource-only by default 4/29/2015 Contrext, LLC 6
  • 7. Resource-Only Keys • Establish context-independent keys for topics • Can be unique across all maps if required or map- or scope-specific • Key-defining maps serve as catalogs of topics or other resources (images, etc.) • Should be used for conrefs • Not useful for cross reference targets: no navigation use context 4/29/2015 Contrext, LLC 7
  • 8. Normal-Role (Navigation) Key • Identifies the unique uses of a given topic • Only appropriate target for cross references • By the nature of keys, are globally unique within a single root map. 4/29/2015 Contrext, LLC 8
  • 9. Key Definition and Usage Best Practice • Define resource-only keys in standalone "key- definition" maps <keydef keys="topic-000123r5" href="topics/t-57623-934.dita"/> • Use resource-only keys from navigation topicrefs: <chapter keys="chap-01" keyref="topic-000123r5"/> • Put keys on either all navigation topicrefs or • Put keys on all navigation topicrefs you want to be publicly linkable 4/29/2015 Contrext, LLC 9
  • 10. Exactly One URI Reference For Each Resource • For images and external Web resources: – Always define a key – Refer to the key (and only the key) from topics • For topics that are or are likely to be reused: – Define resource-only keys in a separate key- defining map • For topics that are only ever used in a single map: – Put @keys on the topicref to the topic 4/29/2015 Contrext, LLC 10
  • 11. Keys for Single-Use Topics • A topic used only once across all maps may not justify the cost of separate resource-only key definition • Define two keys on the topicref: – One that reflects that use of the topic: "ch-01-ss-01" – One that represents the topic in any context: "topic-1235" • Example: <topicref keys="installation topic-1234" href="topics/topic-1234.dita" /> • If the topic is ever reused, create resource-only topicref and move context-independent key to that definition 4/29/2015 Contrext, LLC 11
  • 12. NOTE: DITA OT Limitation • As of OT 2.1 and earlier: – @copy-to on navigation topicrefs that use keyref doesn't work – Copy-to processing is done before key space construction • Fixing this will require rethinking entire preprocessing approach – Rethink required for DITA 1.3 anyway – Non-trivial to implement • Workaround: Use separate keydefs for each required copy-to: <keydef keys="key-01" href="topic-01.dita"/> <keydef keys="key-01-copy-to-c01s01" href="topic-01.dita" copy-to="ch01-sec01.dita"/> … <topicref keys="ch01-sec01" keyref="key-01-copy-to-c01s01"/> 4/29/2015 Contrext, LLC 12
  • 13. Example: Publication root map <map> <title>Prod1 Product Guide</title> <mapref href="keysdefs-01.ditamap"/> <topicref keys="pubroot" keyref="topic-ABC001" > <topicref keys="chapter-01" keyref="topic-ABC123" > <topicref keys="ch01-overview" keyref="topic-ABC456" > </topicref> … </topicref> … </map> 4/29/2015 Contrext, LLC 13
  • 14. Example: keydefs-01.ditamap <map> <title>Keydefs for Group 1</title> <keydef keys="topic-ABC001" href="topic-ABC001.dita" /> <keydef keys="topic-ABC002" href="topic-ABC002.dita" /> … </map> 4/29/2015 Contrext, LLC 14
  • 15. Cross Reference Example <p>See <xref keyref="chapter-01"/>… <p>See <xref keyref="chapter-01/fig-01"/> 4/29/2015 Contrext, LLC 15
  • 16. Generating Public Deliverable Anchors • Two basic use cases: – Multi-file outputs (HTML, online help) – Monolithic outputs (PDF, EPUB, etc.) • General problem: anchors for non-topic elements – Only unique within a single topic – Not necessarily unique within result documents • Must combine keys with element IDs in some cases 4/29/2015 Contrext, LLC 16
  • 17. Multi-File Outputs (HTML) • Use navigation keys to determine result filenames: <topicref keys="chapter-01" keyref="topic-ABC123" > becomes chapter-01.html • Use navigation key plus element ID to construct in-document anchors 4/29/2015 Contrext, LLC 17
  • 18. Monolithic Outputs (PDF) • Use navigation key for topic anchors • Use navigation key+element ID for non-topic anchors • For PDF, need to use a separator that uses legal URL characters, e.g. "_._", "-.-" – Needs to be more than "-" or "_" to avoid accidental collisions 4/29/2015 Contrext, LLC 18
  • 19. Preprocessing Extensions • DITA Community project • Extends base preprocessing to add @copy-to to topicrefs as required – Second and subsequent reference to a given topic – Will eventually use keys for the filename value • Some subtle complexities • Haven't had time to implement yet 4/29/2015 Contrext, LLC 19
  • 20. Summary • Always use keys for all references – To topics – To images – To peer maps (DITA 1.3) • Put keys on navigation topicrefs • Crossrefs should point to navigation keys • Use navigation keys to generate anchors in deliverables 4/29/2015 Contrext, LLC 20
  • 21. Resources • Paper: http://github.io/dita- community/paper-dita-keys-as-public-anchor- ids • Preprocessing extensions: https://github.com/dita-community/org.dita- community.preprocess-extensions • Me: ekimber@contrext.com, http://contrext.com 4/29/2015 Contrext, LLC 21