Altova Mailing List Archives

Re: first letter in capital?

From: "Ikke" <Mail@--.------>
Date: 12/22/2003 12:14:00 AM
"Neil Smith" <neil@n...> schreef in bericht
> So, here's an ameded template - it's a bit more complicated but still
> possible to follow : Run it and note the commented out 'with-param'
> section for select="title"
> Now, uncomment the section and run it again. What happening is that
> you are now passing a parameter in, and this over-rides the default
> delimiter (a dot) which I placed in the ucwords template.
> You could just as easily place a space as a delimiter, directly in the
> ucwords delim param, but this is to illustrate you have a little more
> choice of delimiter with minimal extra code. So you can choose at the
> top level whether to capitalise after a space, or a dash, or.... (but
> not both - see Dimitres example for a proper way to do that)
> So, anyway the extra stuff in the ucwords template basically goes 'if
> there's a delimiter in my string, split it before and after, and call
> this template twice' (before, and after) 'until there are no
> delimiters left'. It also adds back the delimiter in between, which we
> just removed ;-)
> Then, on each call where no delimiters remain in the string, spit out
> the capitalised word ( <xsl:otherwise> does that part)
> So for a string like 'lightning crashes' it goes in once, decides to
> split up the string into 2, and calls itself again, returning
> 'Lightning' the 1st call, and  'Crashes' the second call.
> Does that make sense ?
Yes it does, thanks



These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.