Automatically generating task labels (stepxmp, stepresult)
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 38
- Joined: Thu May 25, 2023 4:08 pm
Automatically generating task labels (stepxmp, stepresult)
Hello,
I'm using Oxygen XML Editor v25.1, with a project based on the ootb startup project.
I've enabled the "args.gen.task.lbl" parameter, which generates the majority of task labels. Unfortunately, the output doesn't generate labels for <stepxmp> and <stepresult> elements.
I'm aware such text can be added via CSS, but the resulting output isn't selectable and readable via screen readers (therefore against my company's localization and accessibility guidelines,) so I want to display these labels in the same way that labels such as "About this task" (<context>), "Results" (<result>), or "What to do next" (<postreq>) are displayed.
Kind regards,
Konrad
I'm using Oxygen XML Editor v25.1, with a project based on the ootb startup project.
I've enabled the "args.gen.task.lbl" parameter, which generates the majority of task labels. Unfortunately, the output doesn't generate labels for <stepxmp> and <stepresult> elements.
I'm aware such text can be added via CSS, but the resulting output isn't selectable and readable via screen readers (therefore against my company's localization and accessibility guidelines,) so I want to display these labels in the same way that labels such as "About this task" (<context>), "Results" (<result>), or "What to do next" (<postreq>) are displayed.
Kind regards,
Konrad
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Automatically generating task labels (stepxmp, stepresult)
Hi Konrad,
Are you publishing to PDF (CSS based on XSL-FO based) or WebHelp?
For some DITA task elements the DITA OT stylesheets do not generate any labels.
You can look in the stylesheet "OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.html5/xsl/task.xsl"
There is a template which matches:
and also a "mode="generate-task-label"" in which for certain elements the label is generated. I cannot precisely state why for certain elements the decision was taken not to present labels before them.
The label variables are defined here:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.base/xsl/common/strings-en-us.xml
Regards,
Radu
Are you publishing to PDF (CSS based on XSL-FO based) or WebHelp?
For some DITA task elements the DITA OT stylesheets do not generate any labels.
You can look in the stylesheet "OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.html5/xsl/task.xsl"
There is a template which matches:
Code: Select all
<xsl:template match="*[contains(@class,' task/stepxmp ')]" name="topic.task.stepxmp">
<xsl:call-template name="generateItemGroupTaskElement"/>
</xsl:template>
The label variables are defined here:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.base/xsl/common/strings-en-us.xml
Code: Select all
<variable id="task_context">About this task</variable>
<variable id="task_example">Example</variable>
<variable id="task_postreq">What to do next</variable>
<variable id="task_prereq">Before you begin</variable>
<variable id="task_procedure">Procedure</variable>
<variable id="task_procedure_unordered">Procedure</variable>
<variable id="task_results">Results</variable>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 38
- Joined: Thu May 25, 2023 4:08 pm
Re: Automatically generating task labels (stepxmp, stepresult)
Hi Radu,
I was able to customise some of the strings as a test and get the appropriate results in my local WebHelp Responsive output.
In addition, I changed the text of some of the existing labels using https://www.oxygenxml.com/doc/versions/ ... nsive.html (used the DITA OT Integrator scenario though.)
Now, my project is stored in a Git repository and is supposed to act as a "template" for other authors in the company, who would simply fork the repo and proceed to use the project for their needs. How can I make sure that the changes I made (essentially creating a new DITA OT plugin, which as per instructions was done in the Oxygen installation directory) are included in that shared project?
For further context, the project has been created from the out-of-the-box Oxygen Startup Project, with DITA and DITA Map extension scripts, and a publishing template file.
Kind regards,
Konrad
I was able to customise some of the strings as a test and get the appropriate results in my local WebHelp Responsive output.
In addition, I changed the text of some of the existing labels using https://www.oxygenxml.com/doc/versions/ ... nsive.html (used the DITA OT Integrator scenario though.)
Now, my project is stored in a Git repository and is supposed to act as a "template" for other authors in the company, who would simply fork the repo and proceed to use the project for their needs. How can I make sure that the changes I made (essentially creating a new DITA OT plugin, which as per instructions was done in the Oxygen installation directory) are included in that shared project?
For further context, the project has been created from the out-of-the-box Oxygen Startup Project, with DITA and DITA Map extension scripts, and a publishing template file.
Kind regards,
Konrad
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Automatically generating task labels (stepxmp, stepresult)
Hi Konrad,
Maybe as an alternative you could see how those elements like "stepxmp" are published in the HTML content, then using CSS you could match those spans and add some ":before" static content to them. In this way maybe the CSS customization could be distributed more easily as part of a WebHelp publishing template.
Regards,
Radu
Maybe as an alternative you could see how those elements like "stepxmp" are published in the HTML content, then using CSS you could match those spans and add some ":before" static content to them. In this way maybe the CSS customization could be distributed more easily as part of a WebHelp publishing template.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 38
- Joined: Thu May 25, 2023 4:08 pm
Re: Automatically generating task labels (stepxmp, stepresult)
Hi Radu,
Unfortunately, in my company it's against some guidelines, see my initial post:
Kind regards,
Konrad
Unfortunately, in my company it's against some guidelines, see my initial post:
Would copying the DITA dir from the Oxygen installation directory to ${pd}/custom-settings/frameworks/dita, and then updating my project settings (Options > Preferences > DITA, with Project Options enabled) to use that folder as the custom DITA OT location be a valid approach?I'm aware such text can be added via CSS, but the resulting output isn't selectable and readable via screen readers (therefore against my company's localization and accessibility guidelines,) so I want to display these labels in the same way that labels such as "About this task" (<context>), "Results" (<result>), or "What to do next" (<postreq>) are displayed.
Kind regards,
Konrad
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Automatically generating task labels (stepxmp, stepresult)
Hi Konrad,
Sorry I forgot to reply to your next to last post.
So:
https://www.oxygenxml.com/doc/ug-editor ... aid-title5
A publishing template opt configuration file allows adding various extension points, some implemented with XSLT, like for example the publishing template for the Oxygen XML Blog:
https://github.com/oxygenxml/blog/blob/ ... mplate.opt
If you create a WebHelp publishing template folder it can be kept outside of the DITA OT installation folder and using in the ".opt" file an extension point like this:
allows you to specify an XSLT stylesheet which could override specific XSLT templates from the base "org.dita.html5" plugin.
After you have a publishing template you can edit the DITA to WebHelp Oxygen transformation scenario you are using and use it in the "Templates" tab.
Regards,
Radu
Sorry I forgot to reply to your next to last post.
So:
The DITA OT publishing engine bundled with Oxygen is situated in the "OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT" folder. It can indeed be copied some place else (even to a framework extension folder) and then in the Oxygen Preferences->"DITA" page this custom DITA OT folder can be used instead of the one bundled with Oxygen.Would copying the DITA dir from the Oxygen installation directory to ${pd}/custom-settings/frameworks/dita, and then updating my project settings (Options > Preferences > DITA, with Project Options enabled) to use that folder as the custom DITA OT location be a valid approach?
Have you customized the WebHelp output before?Any ideas on how to effectively share this type of customisation across the team, as per my previous post?
https://www.oxygenxml.com/doc/ug-editor ... aid-title5
A publishing template opt configuration file allows adding various extension points, some implemented with XSLT, like for example the publishing template for the Oxygen XML Blog:
https://github.com/oxygenxml/blog/blob/ ... mplate.opt
If you create a WebHelp publishing template folder it can be kept outside of the DITA OT installation folder and using in the ".opt" file an extension point like this:
Code: Select all
<extension
id="com.oxygenxml.webhelp.xsl.dita2webhelp"
file="xsl/customDita2webhelp.xsl"/>
After you have a publishing template you can edit the DITA to WebHelp Oxygen transformation scenario you are using and use it in the "Templates" tab.
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