Hi Stefan,


Thank you for your reply. I already did a similar thing for the MiramoPDF plug-in:


    <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>


It was a matter of just adding this code to a "custom.xsl" file. In oXygen's CHM tranformation, I wouldn't know where add this code. I am not XSLT savvy enough.


Regards,

Frank




Am 13.02.2023 um 22:39 schrieb Stefan Jung:
Hi Frank,

It depends a little bit where exactly you want to have that code and for what purpose. If you are looking for an inline element, which can be inserted everywhere, you can create a new element or you use, for example, a phrase element with an outputclass attribute and then inject the date in the format of your choice in XSLT. 

<ph outputclass="copyright"/>

Best regards



Gesendet mit OX Mail

Frank Dissinger <frank.dissinger@cgs-oris.com> hat am February 13, 2023 um 5:37 PM geschrieben:

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.dissinger@cgs-oris.com | Web 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
--

Frank Dissinger

Documentation Manager

....................................................................

CGS Publishing Technologies International GmbH

Email frank.dissinger@cgs-oris.com | Web 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