Subject: RE: [xsl] test if first char in string is letter From: "Mario Madunic" <Mario_Madunic@xxxxxxxxxxxx> Date: Thu, 3 Jun 2010 10:46:53 -0500 |
Found the solution in MK's book. string(number(substring(child::*[4], 1, 1))) = 'NaN' Sorry about that. Marijan (Mario) Madunic Publishing Specialist New Flyer Industries -----Original Message----- From: Mario Madunic [mailto:Mario_Madunic@xxxxxxxxxxxx] Sent: Thursday, June 03, 2010 10:42 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] test if first char in string is letter What is the quickest way to test if the first char in a string is a letter (case does not really matter)? BG: I have a situation where the 4th entry (in a table structure) is supposed to be either empty or number, but due to styling issues in Frame sometimes a string may appear (very rare). I want to remove the string to the 5th entry (combine both the 4th and 5th into the 5th entry) and leave an empty 4th entry. I could do it long hand : lower-case(substring(child::*[4], 1, 1)) = 'a' or lower-case(substring(child::*[4], 1, 1)) = 'b'etc but that seems a bit excessive. I'm doing this in an <xsl:template match="para[string-length(normalize-space(.)) = 0 and ancestor::*/@cols = '5']"> Would like to add a test after the @cols check. Any insight would be appreciated. Thanks Marijan (Mario) Madunic Publishing Specialist New Flyer Industries -------------------------------------------------------------------- Please consider the environment before printing this e-mail. CONFIDENTIALITY STATEMENT: This communication (and any and all information or material transmitted with this communication) is confidential, may be privileged and is intended only for the use of the intended recipient. If you are not the intended recipient, any review, retransmission, circulation, distribution, reproduction, conversion to hard copy, copying or other use of this communication, information or material is strictly prohibited and may be illegal. If you received this communication in error or if it is forwarded to you without the express authorization of New Flyer, please notify us immediately by telephone or by return email and permanently delete the communication, information and material from any computer, disk drive, diskette or other storage device or media. Thank you. -------------------------------------------------------------------- Please consider the environment before printing this e-mail. CONFIDENTIALITY STATEMENT: This communication (and any and all information or material transmitted with this communication) is confidential, may be privileged and is intended only for the use of the intended recipient. If you are not the intended recipient, any review, retransmission, circulation, distribution, reproduction, conversion to hard copy, copying or other use of this communication, information or material is strictly prohibited and may be illegal. If you received this communication in error or if it is forwarded to you without the express authorization of New Flyer, please notify us immediately by telephone or by return email and permanently delete the communication, information and material from any computer, disk drive, diskette or other storage device or media. Thank you.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] test if first char in string , Mario Madunic | Thread | Re: [xsl] test if first char in str, David Carlisle |
[xsl] test if first char in string , Mario Madunic | Date | Re: [xsl] test if first char in str, David Carlisle |
Month |