Hi Radu,
Works like a charm. Thank you!!!
Regards,
Frank
------------------------------------------------------------------------
Am 14.02.2023 um 10:27 schrieb Oxygen XML Editor Support (Radu Coravu):
Hi Frank,
I created a small DITA OT plugin (please see attached) which adds the
same customization you have for Miramo to all XHTML-based outputs,
including CHM. You can look into it to see how the plugin works.
DITA OT plugins are installed something like this:
https://www.oxygenxml.com/doc/ug-editor/topics/dita-ot-install-plugin.html
Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 2/14/23 10:50, Frank Dissinger wrote:
Hi Radu,
Thank you for your reply. I am afraid I am not XSLT-savvy enough to
adapt sketched code and I have never created any DITA-OT plugin. I
would need the exact code and precise instructions where to put that
code in the CHM transformation...
I wonder whether the following solution I found for MiramoPDF could
be adapted to oXygen's CHM transformation?
Copyright.dita
<ph audience="print" outputclass="current_year">
...\Oxygen XML Editor
21\frameworks\dita\DITA-OT3.x\plugins\com.miramo.oris-mmpdf\config\xsl\custom.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs opentopic" version="2.0"
xmlns:mm="http://www.miramo.com/XSL/Transform"
xmlns:opentopic="http://www.idiominc.com/opentopic">
<xsl:include href="./functionstubs.xsl"/>
*<xsl:variable name="bc.currentDate"
select="format-date(current-date(), '[Y0001]')"/>
<xsl:template match="*[@outputclass = 'current_year']" >
<xsl:value-of select="$bc.currentDate" />
</xsl:template>*
</xsl:stylesheet>
Could this code be added somewhere in the CHM transformation?
Regards,
Frank
------------------------------------------------------------------------
Am 14.02.2023 um 07:10 schrieb Oxygen XML Editor Support (Radu Coravu):
Hi Frank,
An Oxygen editor variable expands only once. You seem to need some
kind of macro which would expand every time you publish.
So you seem to need more like a publishing customization.
For DITA XML maybe you can use the <data> element with a certain name:
<data name="currentYear"/>
and then create a DITA Open Toolkit XSLT-based customization plugin
which matches this element at publishing time and replaces it with
the current date. Are you familiar with XSLT? Would you like to
pursue this direction? If so maybe I can try to sketch a small
publishing plugin which would do this.
Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 2/13/23 18:36, Frank Dissinger wrote:
Hi list,
How can I insert the current date into a dita file? I would like to
have oXygen automatically update the year of a copyright notice. I
know that I can define editor variables. But how can I embed them
in the dita code?
If this needs to be tied to the XSL that produces the deliverable:
I need this for CHM, which I generate with oXygen. (I have already
found a solution for MiramoPDF. ) And I'd need to know where
exactly to add the code... Thank you.
Regards,
Frank
*Frank Dissinger*
Documentation Manager
....................................................................
*CGS Publishing Technologies International GmbH*
*Email *frank.dissin...@cgs-oris.com | *Web* www.cgs-oris.com
<http://www.cgs-oris.com/>
*Address* Kettelerstr. 24 | D-63512 Hainburg | Germany
*Phone* +49 6182 9626-27 | *Fax* +49 6182 9626-99
*Commercial register* Offenbach, HRB no. 21495
*Managing directors* Bernd Rückert, Christoph Thommessen
https://www.cgs-oris.com/Signatur.png <https://www.cgs-oris.com/signatur>
_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user