Conref Reuse
Post here questions and problems related to editing and publishing DITA content.
Conref Reuse
Hi,
I created a source topic
I created a target topic and used conref attribute to make use of the tags.
I created map and used both source and target topics and created a bookmap and inserted the map.
After Publishing the bookmap, I am not able to get the text processed properly in the PDF.
This is happening only for conref attributes.
I created a source topic
I created a target topic and used conref attribute to make use of the tags.
I created map and used both source and target topics and created a bookmap and inserted the map.
After Publishing the bookmap, I am not able to get the text processed properly in the PDF.
This is happening only for conref attributes.
Last edited by shiney_98 on Tue Oct 19, 2021 10:33 am, edited 1 time in total.
Re: Conref Reuse
Hi,
This is probably a duplicate of: post63695.html
I'm testing with Oxygen 24 and its bundled publishing engine, without any customizations.
I created a topic "t1.dita" with the content:
and a topic "t2.dita" with the content:
I referenced both topics in a DITA Map and produced PDF using either the "DITA Map PDF - based on XSL-FO" or the "DITA Map PDF - based on HTML5 & CSS" predefined transformation scenarios. In both cases the bold text was properly rendered in the "t2.dita".
If you have the same problem using my samples, maybe you have some PDF customization interfering and causing this problem.
Regards,
Radu
This is probably a duplicate of: post63695.html
I'm testing with Oxygen 24 and its bundled publishing engine, without any customizations.
I created a topic "t1.dita" with the content:
Code: Select all
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="t1">
<title>T1</title>
<body>
<p></p>
<section id="section_nmx_w4q_hrb">
<title>S1</title>
<div><b id="b_yzp_y4q_hrb">DIV REUSE CONTENT</b></div>
</section>
</body>
</topic>
Code: Select all
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="t2">
<title>T2</title>
<body>
<div><b conref="t1.dita#t1/b_yzp_y4q_hrb"/></div>
</body>
</topic>
If you have the same problem using my samples, maybe you have some PDF customization interfering and causing this problem.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Conref Reuse
Hi,
So my source topic is like this
topic1.dita:
<section>
<p id="reuse"> <b id="conref"> Para </b></p>
</section>
And when i use the conref in the target topic, the xml in text mode for the conref is shown like this
topic2:
<p conref = topic1.dita#topic1/reuse />
The id of b tag is getting processed inside the conref element.
I'm currently using this as my xsl.
<xsl:if test="@conref=''">
<xsl:variable name="id" select="substring-after($consub, '/')"/>
<xsl:value-of select="//p[$id = @id]"/>
</xsl:if>
Is there any other solution available for the b tag to get inside ?
So my source topic is like this
topic1.dita:
<section>
<p id="reuse"> <b id="conref"> Para </b></p>
</section>
And when i use the conref in the target topic, the xml in text mode for the conref is shown like this
topic2:
<p conref = topic1.dita#topic1/reuse />
The id of b tag is getting processed inside the conref element.
I'm currently using this as my xsl.
<xsl:if test="@conref=''">
<xsl:variable name="id" select="substring-after($consub, '/')"/>
<xsl:value-of select="//p[$id = @id]"/>
</xsl:if>
Is there any other solution available for the b tag to get inside ?
Re: Conref Reuse
Hi,
The XML content of the topic indeed looks like this:
DITA content is published usually using the DITA Open Toolkit. The DITA Open Toolkit has a pre-processing state in which it expands all content references and creates in a temporary files folder an equivalent of the topic with all content references resolved:
https://www.dita-ot.org/3.6/reference/p ... ssing.html
So if for example I create a plugin for the DITA Open Toolkit which has an XSLT processing stage, that stage will be applied over some topics located in the temporary files folder which have all conrefs expanded.
If you have not implemented a DITA OT plugin before, some links which may be useful:
https://www.dita-ot.org/dev/topics/custom-plugins.html
https://www.youtube.com/watch?v=SK9_FiJiKQs
But if you apply your XSLT directly over the original DITA topic, you will need to expand the conref on your own, directly from the XSLT code.
Regards,
Radu
The XML content of the topic indeed looks like this:
Code: Select all
<p conref = topic1.dita#topic1/reuse />
https://www.dita-ot.org/3.6/reference/p ... ssing.html
So if for example I create a plugin for the DITA Open Toolkit which has an XSLT processing stage, that stage will be applied over some topics located in the temporary files folder which have all conrefs expanded.
If you have not implemented a DITA OT plugin before, some links which may be useful:
https://www.dita-ot.org/dev/topics/custom-plugins.html
https://www.youtube.com/watch?v=SK9_FiJiKQs
But if you apply your XSLT directly over the original DITA topic, you will need to expand the conref on your own, directly from the XSLT code.
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