[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Java to xslt conversion
Something like this:
<xsl:choose> <xsl:when test="string-length(first) + string-length(last) < 50"> <xsl:value-of select="concat(first, ' ', last)"/> </ <xsl:otherwise> <xsl:message>Name truncated!</xsl:message> <xsl:value-of select="concat(substring(first, 1, 1), ' ', last)"/> </ </ Michael Kay Saxonica On 29/09/2010 10:42 AM, sudheshna iyer wrote: I have below java code. I need to convert to xslt. How do i achieve this? Requirement: If (first name + last name) exceeds 50 char, then use (first char of first name + complete last name) and create ErrorMessage indicating that name got truncated.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|