Reputation: 561
I am using XML and XSL for printing the page in ASP.NET..
I am generating XML from Stored Procedure..
In that, I have the 'list of docs' columns.. Like Document 1, Document 2, Document 3,
In that I want to remove the appending comma character ',' (Only the last occurence)
I'm using
<xsl:value-of select="//UploadedDocs/UploadedDocs" />
this xsl value only has to substring ed..
If the String is Document 1, Document 2, Document 3,
I want the Output as Document 1, Document 2, Document 3
What method should I use??
Upvotes: 0
Views: 131
Reputation: 117018
substring($string, 1, string-length($string) - 1)
will remove the last character of $string - regardless of what that character is.
We are assuming here that the $string is something that appears in the original XML document, not created by your XSLT - this part of your question is not entirely clear.
Upvotes: 3