eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTML::TreeBuilder':

Home

everywhere
www.exept.de
for:
[back]

Class: TreeBuilder (in HTML)


Inheritance:

   Object
   |
   +--HTML::AbstractTreeBuilder
      |
      +--HTML::TreeBuilder

Package:
stx:goodies/webServer/htmlTree
Category:
Net-Documents-Utilities
Version:
rev: 1.86 date: 2010/02/08 17:11:03
user: mb
file: HTML__TreeBuilder.st directory: goodies/webServer/htmlTree
module: stx stc-classLibrary: htmlTree

Description:


unfinished - will make it easier to construct valid HTML-trees eventually


Class protocol:

html generation
o  htmlContentsOf: aBlock


Instance protocol:

accessing
o  currentForm

o  htmlString
html of the generated tree so far

attributes
o  accesskey: accessKeyAttribute

o  action: actionURLText

o  align: align
The alignment can be left, center, right.

o  alt: altText

o  autocomplete: onOffString
if onOffSTring = 'off' give the browser an hint to not store an input field.
NOTE: this is not W3C standard!

o  bgcolor: colorText

o  border: borderWidthInPixels

o  cellPadding: anInteger

o  cellSpacing: anInteger

o  cellpadding: cellpadding

o  cellspacing: cellspacing

o  checked: aBoolean

o  class: classString

o  cols: n

o  colspan: n

o  content: contentText

o  disabled: aBoolean

o  enctype: enctypeText

o  for: targetID

o  frameborder: frameborder

o  framespacing: framespacing

o  height: aNumberOrPercentString

o  href: href

o  http_equiv: httpEquivText

o  language: source

o  marginheight: marginheight

o  marginwidth: marginwidth

o  maxLength: sz

o  media: typeString

o  method: methodText

o  multiple: multiple

o  noshade

o  nowrap

o  onBlur: action

o  onChange: action

o  onClick: action

o  onDoubleClick: action

o  onFocus: action

o  onKeyPress: action

o  onKeyUp: action

o  onLoad: action

o  onMouseDown: action

o  onMouseMove: action

o  onMouseOut: action

o  onMouseOver: action

o  onMouseUp: action

o  onSelect: action

o  onSubmit: action

o  rel: relText

o  rows: n

o  rowspan: n

o  rules: rulesText

o  scrolling: aBooleanOrStringOrSymbol

o  selected

o  selected: aBoolean

o  size: sz

o  src: source

o  style: moreStyle
set or add-to the style

o  tabindex: anInteger

o  target: targetText

o  title: titleText

o  type: typeString

o  valign: align
Set the vertical align of the table/cell (top|middle|bottom|baseline).

o  value: valueString

o  vspace: verticalSpace

o  width: aNumberOrPercentString

building
o  a

o  a: textOrBlock

o  a: textOrBlock href: href

o  aEnd

o  blockQuote

o  blockQuoteEnd

o  body

o  body: aBlock

o  bodyEnd

o  bold

o  boldEnd

o  br

o  center

o  centerEnd

o  code

o  codeEnd

o  comment: aComment

o  commentAttribute: aComment

o  div
self assert:currentElement isTable not.

o  div: textOrBlock

o  divEnd

o  doesNotUnderstand: aMessage

o  embed

o  embed: objectSourceURL

o  h1

o  h1: textOrBlock

o  h1End

o  h2

o  h2: textOrBlock

o  h2End

o  hr

o  html

o  html: aBlock

o  htmlEnd

o  iframe

o  iframeEnd

o  img: imageSourceURL

o  noscript

o  noscriptEnd

o  p

o  p: someTextOrBlock

o  pEnd

o  pre

o  preEnd

o  script

o  scriptEnd

o  span

o  span: textOrBlock

o  spanEnd

o  strong

o  strong: textOrBlock

o  strongEnd

building-forms
o  button

o  buttonEnd

o  form

o  formEnd

o  input

o  label

o  labelEnd

o  option

o  optionEnd

o  select

o  selectEnd

o  textArea

o  textAreaEnd

o  textarea

o  textareaEnd

building-head
o  base

o  head

o  headEnd

o  link

o  meta

building-lists
o  ol

o  olEnd

building-tables
o  caption

o  captionEnd

o  col

o  colgroup

o  colgroupEnd

o  li

o  liEnd

o  table

o  tableEnd

o  tbody

o  tbodyEnd

o  td

o  tdEnd

o  tfoot

o  tfootEnd

o  th

o  thEnd

o  thead

o  theadEnd

o  tr

o  trEnd

o  ul

o  ulEnd

instance release
o  release

setup
o  beginDocument


Examples:



     |b|

     b := HTML::TreeBuilder new.
     b
        html;
          head;
          headEnd;
          body;
            table;
              tr;
                td; text:'hello'; tdEnd;
                td; text:'world'; tdEnd;
              trEnd;
            tableEnd;
          bodyEnd;
        htmlEnd.
     b htmlString inspect.


     |b|

     b := HTML::TreeBuilder new beginWith:(Document new).
     b 
        head;
        headEnd;
        body;
          table;
            tr;
              td; tdEnd;
              td; tdEnd;
            trEnd;
          tableEnd;
        bodyEnd.
     b rootElement inspect.
     b htmlString inspect.


     |b|

     b := HTML::TreeBuilder new.
     b 
        span;
          table;
            tr;
              td; tdEnd;
              td; tdEnd;
            trEnd;
          tableEnd;
        spanEnd.
     b rootElement inspect.


     |b|

     b := HTML::TreeBuilder new beginWith:(Body new).
     b 
        textArea;
           rawText:'line1';
           rawText:'line2';
           rawText:'line3';
           rawText:'line4
line5
line6';
        textAreaEnd.
     b rootElement printOn:Transcript.


ST/X 6.1.1; WebServer 1.620 at exept:8081; Mon, 21 May 2012 17:34:03 GMT