Configuring editions date format

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Mar/2016, at 18:34

Edition date is displayed using shortName attribute but &e variable uses descName attribute. Both are automatically computed, and the computation is defined in the GN4Editorial.xsd. This may be important when you need to have edition date zero-padded, e.g. 07/01/2011. Below is shown the standard computation for descName:

      <template name="descName" isEditionTemplate="0">

        <xsl:variable name="titleTemplate" select="$title/gn4:editionDescName"/>

        <xsl:choose>

          <xsl:when test="$titleTemplate/*">

            <xsl:copy-of select="$titleTemplate/*"/>

          </xsl:when>

          <xsl:otherwise>

            <var name="titleName"/>

            <text value=" "/>

            <var-date name="date" format="d"/>

            <text value=" "/>

            <var name="editionNumberName"/>

            <text value=" "/>

            <var name="name"/>

          </xsl:otherwise>

        </xsl:choose>

      </template>

The date part is defined in:

              <var-date name="date" format="d"/>

Possible formats are the same used by the .NET DateTime class and are described here: http://msdn.microsoft.com/en-us/library/az4se3k1.aspx.

If in the standard formats you do not find the one you want you can use the custom one: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx.

To enable padding for en-US culture, use this one:

 <var-date name="date" format="MM/dd/yyyy"/>

Newly created editions will have the correct value, for the old ones recomputed the fields using cmd4 recompute.