Strings and Variables - which are used where? #DITA-OT #HTML #PDF


vicmortelmans@...
 

Hi,
I'm puzzled by the DITA-OT mechanism for generated text.

I find two repositories where (localized) generic text is stored. Based on examples, both seem to be retrievable using the "getVariable" XSL template.

1/ Strings
  • location: dita-ot-3.4\plugins\org.dita.base\xsl\common\strings-nl-nl.xml
  • entries look like: <str name="Caution">Let op!</str>
  • customizable by using the "dita.xsl.strings" extension point in plugin.xml
2/ Variables (common vars)
  • location: dita-ot-3.4\plugins\org.dita.pdf2\cfg\common\vars\nl.xml
  • entries look like: <variable id="Foot note">Voetnoot.</variable>
  • customizable only by adding a file to the "Customization" directory to my plugin and updating its catalog.xml
Because they belong to different plugins, I can guess that the "Strings" can be used in all output types, and the "Variables" only in PDF output.

I am making a plugin that will produce both PDF and HTML5.

Some questions:

  1. Are most of the above findings/assumptions correct? 
  2. When customizing generated text for my plugin, can I ignore the "Variables" alltogether and use only "Strings" as a repository for any of my custom text, that is retrieved using the "getVariable" template?
  3. There's also a file "commonvariables.xml" containing text that is not translated, how can I customize that in my plugin? 


Thanks for sharing some experience,
Best regards,

Vic

Join main@dita-users.groups.io to automatically receive all group messages.