xsl-list
[Top] [All Lists]

Re: [xsl] only last 14 characters

2013-05-14 08:47:20
henry human wrote:

Following case:
An Existing field without certain length (could contain whitespaces). I need 
ever the last 14 characters:

<data>
<invoice>
  <field >testString</field ></invoice>
</data>

Well
  <xsl:template match="field">
    <xsl:value-of select="substring(., string-length(.) - 13)"/>
  </xsl:template>
should do, as far as I understand the requirement.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>