Auto generating collection from ditamap
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 19
- Joined: Thu Mar 29, 2012 4:45 pm
Auto generating collection from ditamap
Hi,
I am trying to auto-generate a list of topics from the ditamap after a brief introduction paragraph.
I have created 3 files.
<concept id="concept_y1k_rdj_tf">
<title>Introduction</title>
<shortdesc>This is the introduction</shortdesc>
<conbody>
<p>There are 2 types.</p>
</conbody>
</concept>
<concept id="concept_tjs_sdj_tf">
<title>Type 1</title>
<shortdesc>This is type 1</shortdesc>
<conbody>
<p>Concept definition.</p>
</conbody>
</concept>
<concept id="concept_jgf_5dj_tf">
<title>Type 2</title>
<shortdesc>This is type 2.</shortdesc>
<conbody>
<p>Concept definition.</p>
</conbody>
</concept>
I want the generated output to append the title and shortdesc of type 1 and type 2 topics to the introduction as an unordered list.
e.g.
--
Introduction.
This is the introduction
There a 2 types.
[] Type 1
This is type 1
[] Type 2
This is type 2
--
I created a ditamap file and set the collection-type="unordered".
<map>
<title>DITA Topic Map</title>
<topicref href="Intro.dita" collection-type="unordered">
<topicref href="Type1.dita"/>
<topicref href="Type2.dita"/>
</topicref>
</map>
However, the generated HTML or PDF file does not include the appended list?
Any help please?
Simon
I am trying to auto-generate a list of topics from the ditamap after a brief introduction paragraph.
I have created 3 files.
<concept id="concept_y1k_rdj_tf">
<title>Introduction</title>
<shortdesc>This is the introduction</shortdesc>
<conbody>
<p>There are 2 types.</p>
</conbody>
</concept>
<concept id="concept_tjs_sdj_tf">
<title>Type 1</title>
<shortdesc>This is type 1</shortdesc>
<conbody>
<p>Concept definition.</p>
</conbody>
</concept>
<concept id="concept_jgf_5dj_tf">
<title>Type 2</title>
<shortdesc>This is type 2.</shortdesc>
<conbody>
<p>Concept definition.</p>
</conbody>
</concept>
I want the generated output to append the title and shortdesc of type 1 and type 2 topics to the introduction as an unordered list.
e.g.
--
Introduction.
This is the introduction
There a 2 types.
[] Type 1
This is type 1
[] Type 2
This is type 2
--
I created a ditamap file and set the collection-type="unordered".
<map>
<title>DITA Topic Map</title>
<topicref href="Intro.dita" collection-type="unordered">
<topicref href="Type1.dita"/>
<topicref href="Type2.dita"/>
</topicref>
</map>
However, the generated HTML or PDF file does not include the appended list?
Any help please?
Simon
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Auto generating collection from ditamap
Hi Simon,
You can find a description for the collection-type in the DITA 1.2 specs:
http://docs.oasis-open.org/dita/v1.2/os ... -atts.html
The values of this attribute actually specify to the publishing engine (DITA Open Toolkit in the case of Oxygen) whether to add certain links between the topics. The default value for the attribute is unordered.
I do not think that what you want can be achieved using topicrefs without customizing a considerable amount of stylesheets.
Maybe you can also ask around on the DITA Users List, they might have a solution for you.
Regards,
Radu
You can find a description for the collection-type in the DITA 1.2 specs:
http://docs.oasis-open.org/dita/v1.2/os ... -atts.html
The values of this attribute actually specify to the publishing engine (DITA Open Toolkit in the case of Oxygen) whether to add certain links between the topics. The default value for the attribute is unordered.
I do not think that what you want can be achieved using topicrefs without customizing a considerable amount of stylesheets.
Maybe you can also ask around on the DITA Users List, they might have a solution for you.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 19
- Joined: Thu Mar 29, 2012 4:45 pm
Re: Auto generating collection from ditamap
Thanks for your response.
I was reading the following book:
http://www.scriptorium.com/books/the-di ... r-authors/
It suggested not to create stem topics manually using x-ref but that the stucture should be in the ditamap and the list for the step topic created automatically using the collection-type attribute.
I was therefore supprised that the default implementation didn't do anything with these attributes. Has anyone else written custom output to automatically generate the links?
I was reading the following book:
http://www.scriptorium.com/books/the-di ... r-authors/
It suggested not to create stem topics manually using x-ref but that the stucture should be in the ditamap and the list for the step topic created automatically using the collection-type attribute.
I was therefore supprised that the default implementation didn't do anything with these attributes. Has anyone else written custom output to automatically generate the links?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Auto generating collection from ditamap
Hi Simon,
Fortunately I also have access to the DITA Style Guide
I think that what Tony Self means is that you can use this attribute:
on the parent topic ref and indeed the DITA OT will generate in the parent topic's HTML content links to its child topics.
Regards,
Radu
Fortunately I also have access to the DITA Style Guide

I think that what Tony Self means is that you can use this attribute:
Code: Select all
collection-type="family"
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service