This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Converting a string to small-caps?


> You should consider changing the stylesheet so that it creates the
> fewest number of <span> elements. There should be one <span> element to
> hold a consecutive run of upper-case letters; and one <span> element to
> hold a consecutive run of non-upper-case letters. Think about doing this
> by searching for the first occurrence of an upper-case letter in the
> source string, if it is not the first character then take the substring
> up to that character.

This is more or less my intention, thx for the pointer - I'll have a play.

> Also, think about using <span class="uc"> and <span class="non-uc"> and
> include a <style> block to style the classes span.uc and span.non-uc.
> This seems more efficient that all the style attributes in the span
> elements, and makes it easier for the user to customize the style (ah,
> the blessed cascade of CSS!).

Eventually I intend to do this, but I've got to use the 'larger' and
'smaller' values for font-size as it has to be relative to the surrounding
parent text, whose size is going to be dynamically assigned.

> And don't forget to write to your favorite browser vendors and tell them
> how much you value their conformance to the CSS2 specification. I am
> quite serious. Without feedback, how do they know what we want?

According to my trusty O'Reilly CSS book the browsers are complying with the
spec. The font-variant declaration tells the browser to select the variant
of the current font selected in the value, in this case small-caps. If that
variant isn't there then the spec offers two solutions, either to do the
decent thing and rescale the current face or set the whole string in caps.
Annoying but compliant.

> Cheers,
> Stuart
>

ta for the pointers,
brew



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]