Pages: 1
Print
Author Topic: Capture current date and time and output to PDF  (Read 1649 times)
txvia
Member

Posts: 44


« on: January 29, 2012, 02:13:41 AM »

I am using XMetaL 6.0 SP1 on Windows 7.

I am trying to find out whether I can write a template to output current date and time to PDF when certain conditions are met. For example, whenever I specify "time" in the outputclass field of the <cite> element, I want the template to output current date and time to the <cite>area on PDF when it sees this outputclass value. Is there a way to do this? I am using RenderX to transform my PDF output.

Here is what I am potentially looking into doing:

<xsl:template match="*[contains(@class, ' topic/cite ')]">
  <xsl:choose>
      <xsl:when test="@outputclass='time'">
         .........
         .........
         <fo:inline id="{@id}">
           ........
         </fo:inline>
         <xsl:apply-templates/>
      </xsl:when>
      <xsl:otherwise>
         .........
         .........
      </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Here is a fragment of my DITA source file:

  Current date: <cite>{current date and time output here}</cite>

Thanks.

Logged
Pages: 1
Print
Jump to: