cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: Upper Case of first character.
Date Mon, 18 Dec 2000 15:43:07 GMT
I'm sorry. The </font>< must be removed:

<xsl:value-of select="translate(substring(., 1, 1),
'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:value-of select="substring(., 2)"/>

 ----- Original Message ----- 

From: Piroumian, Konstantin <mailto:KPiroumian@flagship.ru>  
To: cocoon-users@xml.apache.org <mailto:cocoon-users@xml.apache.org>  
Sent: 18 ??????? 2000 ?., ??????????? 18:27
Subject: Re: Upper Case of first character.


One way is to use XSP for that. You can simply use Java functions to
upper-case the first letter.
 
Another way is to do it by XSL. This code makes the first letter bold:
<b><xsl:value-of select="substring(., 1, 1)"/></b></font><xsl:value-of
select="substring(., 2)"/>

You can change it to make the first letter uppercase this way:

<xsl:value-of select="translate(substring(., 1, 1),
'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></font><xsl:value-of
select="substring(., 2)"/>

Something like this...

----- Original Message ----- 
From: Pier Paolo Bortone <mailto:pierpaolo.bortone@netengineering.it>  
To: cocoon-users@xml.apache.org <mailto:cocoon-users@xml.apache.org>  
Sent: 18 ??????? 2000 ?., ??????????? 17:32
Subject: Help: Upper Case of first character.



Hi,
 
I want format the single character of a word. How is it possible? 
 
For example:
 
XML
...
<field>pluto</field>
...
-----------------------
 
XSL  ???
 
----------------------
 
HTML
...
<tag>Pluto</tag>
... 
 
Thanks in advance.
 
Pier Paolo.


Mime
View raw message