Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum



Mark Vincenzes 14.Jul.06 10:33 AM a Web browser
Domino Server 7.0 All Platforms

The web server uses a number of HTML tags to represent notes rich text "font properties".
(The "font properties" are what you specify with the notes editor using the "font" tab of the text info box, and include font face, size, style and color.)

When translating the font properties to HTML, the web server uses a combination of the tags:
<tt> - teletype / mono space font
<b> - bold
<i> - italic
<u> - underline
<s> - strikethru
<font> - for size, color, and face (other than Default Sans Serif)
<sup> - superscript
<sub> - subscript

Of these <sup> and <sub> are considered "text structure" tags by HTML 4.01 and are still proper usage.
The tags <font>, <u>, and <s> are deprecated, and the remaining are "frowned upon".

So, what are the alternatives for the web server to use and how do we go about doing it in a way that does not adversely affect existing applications?

(0) Base example

Assume you have some text, "Hello World!" that you mark as bold, italic, underline, strikethru, dark red, 17pt, Lucida Sans Unicode.
The web server would generate this HTML:

<b><i><u><s><font size="5" color="#C00000" face="Lucida Sans Unicode">Hello World!</font></s></u></i></b>

(The web server translates the point size 17 to a "virtual size" attribute value of "7". There is a web server table that defines how the point sizes are mapped to virtual size numbers.)

(1) Direct use of inline style

Is it sufficient just to translate this to the equivalent inline style attribute of a span tag?

<span style="font-weight: bold; font-style: italic; text-decoration: underline line-through; color: #C00000; font-family: Lucida Sans Unicode; font-size: large">
Hello World!

(Note that I have mapped the virtual size "5" to the CSS font-size "large")

This pattern is difficult to override with a style sheet, since the inline style attribute takes precedence.

(2) Marking with inner span for override

If we add an inner span tag with a well known class name then it would be possible for the application developer to write a stylesheet that overrides the one generated by domino:

<span style="font-weight: bold; font-style: italic; text-decoration: underline line-through; color: #C00000; font-family: Lucida Sans Unicode; font-size: large"><span class="domino_run">Hello World!</span></span>

I selected "domino_run" here because "run" is the element used by DXL to enclose runs of text that have special font information.

(3) Separate style sheet connected to span by "id" attribute

A variation of would use a separate style sheet connected to the span by "id":

<style type="text/css">
#d_f_008 { font-weight: bold; font-style: italic; text-decoration: underline line-through; color: #C00000; font-family: Lucida Sans Unicode; font-size: large}

<span id="d_f_008">Hello World!</span>

This variation can also have the inner span tag for user override.

(4) Separate classes to mimic the original tags:

We define classes that represent the older tags. Some use patterns will need separate classes for combinations of styles.

<style type="text/css">
.d_style_b { font-weight: bold } /* the b tag */
.d_style_i { font-style: italic } /* the i tag */
.d_style_u { text-decoration: underline } /* the u tag */
.d_style_s { text-decoration: line-through } /* the s tag */
.d_style_us { text-decoration: underline line-through } /* both s and u */
/* these represent the seven font size attributes */
.d_fsize_1 {font-size: xx-small}
.d_fsize_2 {font-size: x-small}
.d_fsize_3 {font-size: small}
.d_fsize_4 {font-size: medium}
.d_fsize_5 {font-size: large}
.d_fsize_6 {font-size: x-large}
.d_fsize_7 {font-size: xx-large}

For things like <b> and <u> we can predefine the styles for all generated pages. But for font faces and color we would generate special class names "on the fly" for each form being converted.

<style type="text/css">
.d_face_Lucida_Sans_Unicode { font-family: Lucida Sans Unicode }
.d_color_C00000 { color: #C00000 }

These classes could then be used in nested <span> tags:

<span class="d_color_C00000">
<span class="d_style_b">
<span class="d_style_i">
<span class="d_style_u">
<span class="d_style_s">
<span class="d_fsize_5">
<span class="d_face_Lucida_Sans_Unicode">
Hello World!


Or they can be used together in on class attribute (which is where the class for the combined underline and strikethru is needed):

<span class="d_style_b d_style_i d_style_us d_fsize_5 d_color_C00000 d_face_Lucida_Sans_Unicode">
Hello World!

(5) Disabling certain of the font property specifications.

Another possibility (separate or in combination with one of the above) is to have the web server simply "ignore" some or all of the font properties.

For example the properties can be categorized as:
Face (a name of a font face)
Size (number representing point size)
Style (one or more of: plain, bold, italic, Underline, Strikethrough, Superscript, Subscript, Shadow, Emboss, Extrude)
Color (a color value that ends up as a red, green, blue triple)

There could be an option to disable each or any combination of the four categories. The web server would simply not generate the style settings for that category.

(6) A word about point size and "virtual size"

In the Notes editor you specify font size directly with the point size. The size attribute of the <font> tag uses a "virtual size" of 1 thru 7. CSS provides for virtual sizes xx-small thru xx-large and direct point size. The web server translates from the Notes point size to the virtual size using a table of threshold point sizes. In my examples I have continued using that mapping but substituted the CSS size names for the size attribute values.

I think we also need an option (distinct from the others being discussed) that allows the actual point size specified in the Notes rich text to be carried through to the style sheet.

(7) Conclusion - Comments, suggestions, other alternatives?

I am leaning toward the direct use of a style attribute with an inner span tag with class=domino_run (as in paragraph (2) above) along with an option for selectively disabling certain conversion (as in (5)) and an option for using absolute point size (6).

I invite comments, questions, suggestions, alternate proposals...

alternatives to the font> and other... (Mark Vincenzes 14.Jul.06)
. . RE: alternatives to the font> and o... (Nathan T. Freem... 14.Jul.06)
. . . . RE: alternatives to the font> and o... (Stan Rogers 14.Jul.06)
. . . . . . Why not both ids and classes? (Rich Schwartz 14.Jul.06)
. . . . . . . . RE: Why not both ids and classes? (Stan Rogers 14.Jul.06)
. . . . . . . . . . RE: Why not both ids and classes? (Rich Schwartz 14.Jul.06)
. . . . . . . . . . . . generating class names (Mark Vincenzes 17.Jul.06)
. . . . . . @UserIntent - sounds like an opport... (Mark Vincenzes 17.Jul.06)
. . RE: alternatives to the font> and o... (Thomas Franks 14.Jul.06)
. . . . tables and other stuff... (Mark Vincenzes 15.Jul.06)
. . RE: alternatives to the font> and o... (Nathan T. Freem... 17.Jul.06)
. . . . RE: alternatives to the font> and o... (Nathan T. Freem... 17.Jul.06)
. . . . corrected error - default sans seri... (Mark Vincenzes 17.Jul.06)
. . . . more than I can chew :) (Mark Vincenzes 21.Jul.06)
. . RE: alternatives to the font> and o... (Bo Frederiksen 16.Jul.06)
. . . . FYI, you can use HeadingX styles to... (Mark Vincenzes 1.Aug.06)
. . . . . . RE: FYI, you can use HeadingX style... (Bo Frederiksen 12.Oct.06)
. . . . . . . . Jquery can isolate and override fon... (Zen Lucas 6.Aug.07)
. . Wow! - alternatives to the font> an... (Erik C. Brooks 28.Feb.07)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite