Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://p2p.wrox.com/xslt/62235-stripping-last-x-characters.html

  <xsl:template match="title">
    <xsl:call-template name="strip-end-characters">
      <xsl:with-param name="text" select="."/>
      <xsl:with-param name="strip-count" select="3"/>
    </xsl:call-template>
  </xsl:template>

  <xsl:template name="strip-end-characters">
    <xsl:param name="text"/>
    <xsl:param name="strip-count"/>
    <xsl:value-of select="substring($text, 1, string-length($text) - $strip-count)"/>
  </xsl:template>
  • No labels