Title for prereq, context, postreq elements
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 312
- Joined: Wed Jun 17, 2015 10:19 am
Title for prereq, context, postreq elements
Post by ann.jensen »
Hi,
When using General Task topic type, I would like to have a title associated with each of the elements before and after the <steps>. Is there any way to add a title to these elements OOTB that will then be transformed into a heading in generated HTML?
Thanks in advance,
Ann
When using General Task topic type, I would like to have a title associated with each of the elements before and after the <steps>. Is there any way to add a title to these elements OOTB that will then be transformed into a heading in generated HTML?
Thanks in advance,
Ann
-
- Posts: 918
- Joined: Thu May 02, 2019 2:32 pm
Re: Title for prereq, context, postreq elements
Post by chrispitude »
Hi Ann,
DIfferent transformation types are customized in different ways. What transformation types are you using?
DIfferent transformation types are customized in different ways. What transformation types are you using?
Re: Title for prereq, context, postreq elements
Hi Ann,
The DITA task model is quite restrictive, you cannot add sections in it.
Maybe you can try some workaround like:
Regards,
Radu
The DITA task model is quite restrictive, you cannot add sections in it.
Maybe you can try some workaround like:
Code: Select all
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA General Task//EN" "generalTask.dtd">
<task id="task_b2p_drj_qxb">
<title></title>
<shortdesc></shortdesc>
<taskbody>
<prereq>
<sectiondiv>
<b>Some title before</b>
<p>Some para</p>
</sectiondiv>
</prereq>
<steps>
<step>
<cmd>some step</cmd>
</step>
<step>
<cmd>some step</cmd>
</step>
</steps>
<postreq>
<sectiondiv>
<b>Some title after</b>
<p>Some para</p>
</sectiondiv>
</postreq>
</taskbody>
</task>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 312
- Joined: Wed Jun 17, 2015 10:19 am
Re: Title for prereq, context, postreq elements
Post by ann.jensen »
>>Different transformation types are customized in different ways. What transformation types are you using?
I am using the Oxygen WebHelp tranform. The request is related to web accessibility where my customers want to have headings for each area of the task procedure so that they can be interpreted by automated screen readers....which seems reasonable to me.
I thought it might be possible since prereq, context and postreq are specializations of section but it seems <title> is not a valid child element of these elements.
Regards,
Ann
I am using the Oxygen WebHelp tranform. The request is related to web accessibility where my customers want to have headings for each area of the task procedure so that they can be interpreted by automated screen readers....which seems reasonable to me.
I thought it might be possible since prereq, context and postreq are specializations of section but it seems <title> is not a valid child element of these elements.
Regards,
Ann
-
- Posts: 918
- Joined: Thu May 02, 2019 2:32 pm
Re: Title for prereq, context, postreq elements
Post by chrispitude »
Hi Ann,
I made a DITA-OT plugin for HTML5-based deliverables (html5, webhelp-responsive, pdf-css-html5). It is provided in the following testcase:
In the plugin, there is an XSLT3 map of heading strings that you can customize:
The default output looks like this:
Because <example> elements are allowed to have <title> elements in a task, an example heading is added only if there is no writer-defined title.
In the WebHelp output, note that the "Context", "Steps", and "Example" headings are not picked up by the WebHelp post-processing for sections (expand/collapse, and the right-side TOC). I am not sure how important this is to you.
I made a DITA-OT plugin for HTML5-based deliverables (html5, webhelp-responsive, pdf-css-html5). It is provided in the following testcase:
- webhelp_task_headings.zip
- (3.79 KiB) Downloaded 134 times
In the plugin, there is an XSLT3 map of heading strings that you can customize:
Code: Select all
<!-- define heading values to use for task elements -->
<xsl:variable name="task-headings" as="map(xs:string, xs:string)" select="map {
'prereq': 'Prerequisites',
'context': 'Context',
'steps': 'Steps',
'result': 'Results',
'example': 'Example',
'postreq': 'What Next'
}"/>
- image.png (35.99 KiB) Viewed 1463 times
Because <example> elements are allowed to have <title> elements in a task, an example heading is added only if there is no writer-defined title.
In the WebHelp output, note that the "Context", "Steps", and "Example" headings are not picked up by the WebHelp post-processing for sections (expand/collapse, and the right-side TOC). I am not sure how important this is to you.
Re: Title for prereq, context, postreq elements
Hi Chrispitude,
This topic is quite old but I do have a question about it.
I've implemented your solution and this is nice, but is it really not possible to have the "sections" of the task in the Topic TOC on the right side of the page (like for sections in a concept topic) ?
Thank you for your help!
This topic is quite old but I do have a question about it.
I've implemented your solution and this is nice, but is it really not possible to have the "sections" of the task in the Topic TOC on the right side of the page (like for sections in a concept topic) ?
Thank you for your help!
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