eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTML::Document':

Home

everywhere
www.exept.de
for:
[back]

Class: Document (in HTML)


Inheritance:

   Object
   |
   +--HTML::AbstractElement
      |
      +--HTML::AbstractHTMLElement
         |
         +--HTML::Document

Package:
stx:goodies/webServer/htmlTree
Category:
Net-Documents-ModelTree-TopLevel
Version:
rev: 1.33 date: 2009/03/23 17:19:05
user: cg
file: HTML__Document.st directory: goodies/webServer/htmlTree
module: stx stc-classLibrary: htmlTree

Class protocol:

instance creation
o  newFrameset
Create a new document of type HTML 4.01 frameset with webAdress http://www.w3.org/TR/html4/frameset.dtd

o  newStrict
Create a new document of type HTML 4.01 strict with webAdress http://www.w3.org/TR/html4/strict.dtd.

o  newTransitional
Create a new document of type HTML 4.01 Transitional with webAdress http://www.w3.org/TR/html4/loose.dtd

required protocol
o  tagName


Instance protocol:

accessing
o  docType
Return document type or nil.

o  docType: something

o  docTypeString
Return document type or nil.

o  fileName: aStringOrFileName

o  htmlVersion

o  htmlVersion: something

o  languageVariant

o  languageVariant: something

o  url

o  url: something

o  webAddress

o  webAddress: something

interface-accessing-elements
o  addHeading1: aHeading1OrString
Add a level one heading to the page.

The heading will be added as last
component in the body.

o  addHeading2: aHeading2OrString
Add a level two heading to the page.

The heading will be added as last
component in the body.

o  addHeading3: aHeading3OrString
Add a level three heading to the page.

The heading will be added as last
component in the body.

o  addHeading4: aHeading4OrString
Add a level four heading to the page.

The heading will be added as last
component in the body.

o  addHeading5: aHeading5OrString
Add a level five heading to the page.

The heading will be added as last
component in the body.

o  addHeading6: aHeading6OrString
Add a level six heading to the page.

The heading will be added as last
component in the body.

o  addHorizontalRule
Add a horizontal rule to the pages body.

o  addParagraph: aParagraphOrString
Add a level paragraph to the pages body.

The heading will be added as last
component in the body.

o  addTable
Add a level paragraph to the pages body.

The heading will be added as last
component in the body.

o  body
Return the body of the html-document.

o  body: anElement

o  head
Return the head of the html-document.

o  head: anElement

o  title: aTitleOrString
Set a title for this document.
The title will be displayed in the window title bar.
The title can be a simple string or a html-title object.

private-accessing
o  getBody
Return a body to add elements.
If no body exists, build one.

o  getHead
Return a head to add elements.
If no head exists, build one.

queries
o  canHaveChild: anotherElement
return true, if anotherElement is allowed as my child

required-visiting
o  acceptHTMLVisitor: aVisitor
visitor pattern: dispatch me to the visitor


Examples:


Example document with some headings to show something: (A document itself would not show something. All necessary top-level parts get built automatically.)


    |document|

    document := Document new.

    document title:        'This is a generated title'.

    document addHeading1:  'This is a generated level one heading'.
    document addHeading2:  'This is a generated level two heading'.
    document addHeading3:  'This is a generated level three heading'.
    document addHeading4:  'This is a generated level four heading'.
    document addHeading5:  'This is a generated level five heading'.
    document addHeading6:  'This is a generated level six heading'.

    document addParagraph: 'This is a generated paragraph
                        It contains text and text and text.'.

    document addParagraph: 'This is a another generated paragraph.'.

    document addHorizontalRule.
    document htmlString.
A document with document type:


    |document|

    document := Document newStrict.
    document htmlString.
A totaly empty document:


    |document|

    document := Document new.
    document htmlString.
Document with a title: (The necessary head gets generated automatically)


    |document|

    document := Document new.
    document title:'This is a generated title'.
    document htmlString.


ST/X 6.1.1; WebServer 1.620 at exept:8081; Thu, 24 May 2012 17:15:53 GMT