Inserting topic content to another topic
Post here questions and problems related to editing and publishing DITA content.
Re: Inserting topic content to another topic
Hi,
You can nest a topic in another topic, something like:
or you can copy the entire contents of the body element from the first topic and paste it in the body of the second one.
Regards,
Radu
You can nest a topic in another topic, something like:
Code: Select all
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic1">
<title>Title1</title>
<body>
<p>para1</p>
</body>
<!-- Second topic can go here -->
<topic id="topic2">
<title>Title2</title>
<body>
......
</body>
</topic>
</topic>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Inserting topic content to another topic
Sorry for not making this clear from the start.
I want to insert the other topic's content (several paras, images, lists, etc) as a reusable element. I read in the Help, that normally reusable elements are made only of a part of a topic content. So I thought may be there's other way to do it.
I want to insert the other topic's content (several paras, images, lists, etc) as a reusable element. I read in the Help, that normally reusable elements are made only of a part of a topic content. So I thought may be there's other way to do it.
Re: Inserting topic content to another topic
Hi,
You can make a content reference from one element to another. Or a content reference from one element to a bunch of other consecutive elements with the same name (which is not an option for your case).
You could surround all elements which need to be reused in a section with an @id and then make a content reference to that section from the other topic.
Regards,
Radu
You can make a content reference from one element to another. Or a content reference from one element to a bunch of other consecutive elements with the same name (which is not an option for your case).
You could surround all elements which need to be reused in a section with an @id and then make a content reference to that section from the other topic.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Inserting topic content to another topic
Thank you, Radu. Wrapping everything in <section> did the trick. However, I stumblued upon another problem. The inserted topic belongs to other ditamap than the current one. The references in this topic get broken when I print the current ditamap. Can I set a condition that will print these references as plain text instead of links for this ditamap?
Re: Inserting topic content to another topic
Hi,
You could do this with conditional profiling.
Basically the reused content would have something like:
And then you would publish one DITA Map by eliminating all elements with @audience="secondMap" and you would publish the other by eliminating the @audience="firstMap"
If you edit a transformation scenario in Oxygen, in the Filters tab you can either refer to a DITAVAL filter file or specify directly that you want to filter a certain attribute with a certain value.
Some useful links if you are not familiar with profiling:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ments.html
and a video demonstration which shows another evolved way to profile with Oxygen by defining profiling condition sets:
http://www.oxygenxml.com/demo/DITA_Profiling.html
Regards,
Radu
You could do this with conditional profiling.
Basically the reused content would have something like:
Code: Select all
<xref audience="firstMap" href="topic.dita"/><ph audience="secondMap">FALLBACK TEXT</ph>
If you edit a transformation scenario in Oxygen, in the Filters tab you can either refer to a DITAVAL filter file or specify directly that you want to filter a certain attribute with a certain value.
Some useful links if you are not familiar with profiling:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ments.html
and a video demonstration which shows another evolved way to profile with Oxygen by defining profiling condition sets:
http://www.oxygenxml.com/demo/DITA_Profiling.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Inserting topic content to another topic
Thanks, Radu.
One of the reusable parts is inserted as to a topic in ditamap B.
The original topic A contains the following <codeblock> section
This code snippet is displayed correctly when printing the original ditamap A, but when printing ditamap B (the one containing the reusable part), the code snippet is not printed and I get an error during the transformation process. How can I fix this?
It is worth mentioning that the 2 ditamaps reside in different folders.
One of the reusable parts is inserted as
Code: Select all
<section conref="path/to/topic/A"/>
The original topic A contains the following <codeblock> section
Code: Select all
<codeblock outputclass="c" class="+ topic/pre pr-d/codeblock "><coderef href="examples/hello/hello_main.c"/></codeblock>
It is worth mentioning that the 2 ditamaps reside in different folders.
Re: Inserting topic content to another topic
Hi,
I will assume that the @conref attribute value correctly references the target element.
For example if you open the DITA Map in the DITA Maps Manager and use "Validate and check for completeness", does it report any problems? If it does not, the problem could be this one:
http://www.oxygenxml.com/doc/ug-editor/ ... -refs.html
Regards,
Radu
I will assume that the @conref attribute value correctly references the target element.
For example if you open the DITA Map in the DITA Maps Manager and use "Validate and check for completeness", does it report any problems? If it does not, the problem could be this one:
http://www.oxygenxml.com/doc/ug-editor/ ... -refs.html
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