xsl-list
[Top] [All Lists]

Re: First character in a word as capital-letter.

2005-09-13 02:46:17

Thanks a lot!

Yes, my output is HTML. Do you know the instruction in CSS for outputting the 
first character in a word as capital-letter?

Thanks,
Dariusz



xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com schrieb am 13.09.05 11:18:25:

On 9/13/05, Dariusz Borowski <d(_dot_)borowski(_at_)web(_dot_)de> wrote:

Hi!

Could anyobdy tell me if there is a function in xpath which can make the 
first character in a word as a capital-letter.

e.g.
- closed
(should be written as)
- Closed

define two variables:

<xsl:variable name="uppercase" select="'ABC..XYZ'"/>
<xsl:variable name="lowercase" select="'abc..zyz'"/>

(but write out the whole alphabet)

then use:

<xsl:value-of select="concat(translate(substring(., 1, 1), $lowercase,
$uppercase), substring(.,2))"/>

If your target output is HTML then there's a CSS instruction that can do it.

cheers
andrew

--~------------------------------------------------------------------
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>
--~--



______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


--~------------------------------------------------------------------
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>
--~--