[Gambas-devel] Well, I kept my promise

Kadaitcha Man nospam.nospam.nospam at ...176...
Thu Dec 10 07:10:56 CET 2009


Fabien Bodard wrote:

> Why not use xml to rewrite the pages ?

Why? That's crazy. You'd be better off with standards compliant XHTML 1.1:

1) You can display selected text in a browser control.
2) No changes will be needed to view the entire help text in a browser.
3) No conversion will be necessary between HTML and XML.
        Multipurpose, single source help text.
4) The web pages can be maintained in a webpage editor.
5) If you want to change the layout you just change the cascading
   style sheet styles. Instant layout change.

> with that we can separate Title, Signature, explanation, exemple

All that can be done with XHTML.

> then with a CSS this is possible to manage the display... it's just
> an idea ...

<!DOCTYPE html PUBLIC "-//W3C//...">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
        <title>Untitled 1</title>
        <style type="text/css">
        </style>
        <link href="...gambas3_style.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div class="Title">
            <p class="style_bold">How quickly daft jumping zebras vex.</p>
        </div>

        <div class="Signature">
            <p class="style_bold">Quick wafting zephyrs vex bold Jim.</p>
        </div>

        <div class="Notes">
            <p class="style_bold">Pack my box with five dozen liquor 
jugs.</p>
            <p class="style_plain">The five boxing wizards jump quickly.</p>
        </div>

        <div class="Explanation">
            [Some more CSS formatted text]
        </div>

        <div class="Example">
            [Some more CSS formatted text]
        </div>
    </body>
</html>

All you need do is:

1) Copy <html> [...] <body>
2) Run down the XHTML path looking for the class you want
3) Append <div> [...] </div></body></html> to the copy
4) Throw it into a browser control





More information about the Devel mailing list