Neatware Header
Home   Products   Forums   Partners   Buy   Company   Contact   Blog   

Snaml for XHTML

HyperText Markup Language (HTML) is a description language for web document. Berent. Lee innovated the HTML from SGML. Netscape first implemented a widely used HTML browser. Today HTML is a defacto standard for web document.

The new Extensible Markup Language (XML) of W3 standard extended HTML to allow authors define new tags and attributes. XHTML 1.0 is an XML application for HTML 4.0. XHTML is designed to be the presentation standard for both web and mobile document.

As description languages, XHTML and XML are very suitable to represent embedded documents. However, since these languages are lack of variables, it is difficult to use them as programming languages. Therefore, the XHTML document may be not well on modularity and reusability.

Snaml for XHTML added the block command and inline command to integrate the Tcl with XHTML and other XML standards. Snaml code can be an XHTML generator. It can generate an XHTML web page and document. Snaml programs make a web site more maintainable, modifiable, and reusable. Another benefit of application builded by Snaml is higher level consistence. Snaml is well done on the Presentation Logic on Web Applications.

XHTML

  1. XHTML Introduction
  2. Attribute, Structure, and Meta
  3. Object, Image, and Table
  4. Font, Size, and Color
  5. Text, List, and Link
  6. Form, Basic, and Advanced
  7. Frame
  8. Scripts
  9. Cascading Style Sheets (CSS)

A Simple Example

Following simple Snaml program shows a picture with a title and output to hello.html.

package require SNAML
output file hello.html

use snaml package and output to hello.html file.

_xhtml
  _head
    _title; quote "Hello World"; title_
  head_

xhtml header and title.

  _body
    __img "src='hello.gif' alt='hello'"
    quote "Hello World!"
  body_
xhtml_

display an image in the xhtml body