Syntax Highlighting for reused code blocks
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 1
- Joined: Thu Jan 04, 2018 11:36 am
Syntax Highlighting for reused code blocks
Hello,
I have an API documentation with several reference topics for each API element (class, enum etc.). In the reference topic I use the codeblock element for this purpose. In the code block I use one ph to be able to reuse it.
However, I want to add one big code block to the appendix of the document that contains all the API elements. I did this with one reference topic and one codeblock that contains ph blocks that (conref) pull the content from other code blocks.
This works fine without syntax highlighting. When I enable syntax highlighting with the outputclass attribute, the resulting code is still not highlighted because it is nested in a ph element. Highlighting works fine when I remove the ph element but then conref does not work anymore...
Are there any solutions ideas on how to achieve code block reuse with syntax-highlighting?
Many Thanks
I have an API documentation with several reference topics for each API element (class, enum etc.). In the reference topic I use the codeblock element for this purpose. In the code block I use one ph to be able to reuse it.
Code: Select all
<codeblock outputclass="language-cpp"><ph id="code_reuse">
enumeration test
{
ONE
TWO
</ph>
</codeblock>
Code: Select all
<codeblock outputclass="language-cpp">
<ph conref="test.dita#reference_lxt_33z_dcb/code_reuse"/></ph>
</codeblock>
Are there any solutions ideas on how to achieve code block reuse with syntax-highlighting?
Many Thanks
-
- Posts: 9444
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Syntax Highlighting for reused code blocks
Hi,
We might be able to fix this problem in the XSLT stylesheets we developed to perform the syntax highlight, I will add an internal issue to look further into this.
If you want to test a possible fix you can contact us directly via email (support@oxygenxml.com) and I can try to give you some steps to add the fix on your side.
Regards,
Radu
We might be able to fix this problem in the XSLT stylesheets we developed to perform the syntax highlight, I will add an internal issue to look further into this.
If you want to test a possible fix you can contact us directly via email (support@oxygenxml.com) and I can try to give you some steps to add the fix on your side.
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