Altova Mailing List Archives
>microsoft.public.xsl Archive Home
>Thread Prev - Re: first letter in capital?
>Thread Next - Re: first letter in capital?
Re: first letter in capital?
Date: 12/20/2003 12:40:00 PM
"Neil Smith" <neil@n...> schreef in bericht news:3fe3a4f6.25688748@n...... > Oh, sorry I missed that (it's late here) : > > The key is to call the ucfirst template 'recursively'. You need to > split the word at a ' ' space character, and pass the word back to the > same template, using call-template, with $input as a parameter (in the > same way you call-template ucwords the first time). > > To stop it hanging : You will also need a test in the 'ucwords' > template that if string-length ($input < 2) (it contains only a > space or an empty string) that the template does not call itself > again. > > Or , bette r , if string-length($input > 1) then you call the > template again, else do nothing (and so you return the accumulated > value to the main template) > > I'll show you what I mean tomorrow when I recover from the lieklyl > hangover ;-) > > Cheers - Neil. > Thanks, and bottoms up ;-)