RE: [xsl] Camel case tokenizing

Subject: RE: [xsl] Camel case tokenizing
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 24 Oct 2006 15:10:00 +0100
> Hi all, can anyone recommend the best way to split a lower 
> camel cased string into a space separated string using XSLT 
> 2. The first character of each word should be upper case:
> For example an input of 'seeMorePeople' would be output as 
> 'See More People'


<xsl:analyze-string select="$in" regex="\p{{Lu}}\p{{Ll}}*">
    <xsl:text> </xsl:text>
    <xsl:value-of select="."/>
    <xsl:value-of select="concat(upper-case(substring(.,1,1)),

not tested

Michael Kay

Current Thread