Webhelp classic, modfying XSL - can I case off of profiling attributes or transform parameters?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
Webhelp classic, modfying XSL - can I case off of profiling attributes or transform parameters?
Oxygen 20.0. I'm modifying some of the XSL for the webhelp classic transformation (my favorite transformation scenario, it's so good, please don't remove it!).
I'd like to create an if statement that is dependent on one or both of the following:
* The transformation scenario parameters (such as args.default.language).
* The Oxygen profiling attributes (such as when I run a scenario with audience="EU").
Is this possible? If so, how do I do it?
I'd like to create an if statement that is dependent on one or both of the following:
* The transformation scenario parameters (such as args.default.language).
* The Oxygen profiling attributes (such as when I run a scenario with audience="EU").
Is this possible? If so, how do I do it?
-
- Posts: 9444
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Webhelp classic, modfying XSL - can I case off of profiling attributes or transform parameters?
Hi,
So:
and use it in the transformation scenario in the "Filters" tab.
After this, you should probably be able to match the attribute in the XSLT. The profiling attribute will also be passed to the output HTML document as a "data-audience" attribute set on the element.
Regards,
Radu
So:
The args.default.language ANT parameter should be passed to an XSLT parameter called $DEFAULTLANG which you can try to use in your XSLT.The transformation scenario parameters (such as args.default.language).
Usually the profiling attributes are filtered out before the XSLT is applied but you can create a DITAVAL file having the contents like this:* The Oxygen profiling attributes (such as when I run a scenario with audience="EU").
Code: Select all
<val>
<prop action="passthrough" att="audience"/>
</val>
After this, you should probably be able to match the attribute in the XSLT. The profiling attribute will also be passed to the output HTML document as a "data-audience" attribute set on the element.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9444
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Webhelp classic, modfying XSL - can I case off of profiling attributes or transform parameters?
Hi,
There is no such list of ANT param to XSLT param mappings. I had to search through "DITA-OT2.x/plugins/com.oxygenxml.webhelp.responsive/build_dita_template.xml" to see how the "args.default.language" is used.
Why did you need this information in your XSLT code? If you wanted to translate a certain static text depending on the language you should have called a predefined template called "getVariable" with a certain ID like:
and then provide internationalization for that ID:
https://www.oxygenxml.com/doc/versions/ ... nsive.html
Regards,
Radu
There is no such list of ANT param to XSLT param mappings. I had to search through "DITA-OT2.x/plugins/com.oxygenxml.webhelp.responsive/build_dita_template.xml" to see how the "args.default.language" is used.
Why did you need this information in your XSLT code? If you wanted to translate a certain static text depending on the language you should have called a predefined template called "getVariable" with a certain ID like:
Code: Select all
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'Related concepts'"/>
</xsl:call-template>
https://www.oxygenxml.com/doc/versions/ ... nsive.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