Remove characters from end of string

<xsl:variable name=”l” select=”string-length($authors)”/>
<xsl:variable name= “authors_trimmed” select=”substring(authors,1,$l-5)”/>
last line means save to the variable authors-trimmed the result of substring starting at character 1 and stopping at authors – 5 characters.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s