Mehr aus.ch:
» aus.ch
» ad.aus.ch
» birthday.aus.ch
» easter.aus.ch
» et.aus.ch
» gallery.aus.ch?aegeri
» gravitat.aus.ch
» pisa.aus.ch
» wedding.aus.ch
» year.aus.ch

Mehr from.ch:
» from.ch
» aegeri.from.ch
» americans.from.ch
» art.from.ch
» ctyri.from.ch
» dialects.from.ch
» download.from.ch
» erotic.from.ch
» finance.from.ch
» goodies.from.ch
» galactic.empires.from.ch
» gen.from.ch
» go.from.ch
» jana.from.ch
» lexicon.from.ch
» my.from.ch
» natalia.from.ch
» painter.from.ch
» people.from.ch
» spamwall.from.ch
» sport.from.ch
» sudoku.from.ch
» walz.from.ch

Partner:
» volume.ch


Where Switzerland meets the World

HTE

HTE = Hyper Text Extension - an addition to the HTML standard intruducing new tags for the "on the fly" generation of browser documents.

URL interface

On servers supporting direct HTE access:
» "http://" <domain> "/" { <directory> "/" } <HTE file> [ "?" <key> [ "="" <value> """ ] { "&" <key> [ "="" <value> """ ] } ] .

On all servers:
» "http://" <domain> "/" { <directory> "/" } <HTE cgi>"?="" <HTE file> """ { "&" <key> [ "="" <value> """ ] } .

General rules

HTE tags begin with either "<!" or "<!--!" followed by a keyword and end with either ">" or "-->". Any combination of beginning/ending delimiters is valid.

Keywords and attribute identifiers are not, attribute values are case sensitive.

The empty tag ("<!>" or "<!--!>" or "<!--!-->") instructs the HTE interpreter to skip all immediately following white space.

Indexing in HTE starts with 1.

The HTE interpreter tries to continue in case of an error.

HTE data types

String

A sequence of characters. All other HTE data types are strings with a special syntax and additional rules.

Command

An executable expression. Its syntax depends of the specific context.

Error

The code or description of an error - always empty if no error occured.

Keyword

One out of several strings with a special meaning in a given context. The respective default is used instead of all other strings. Known keywords:
» "+": The logical value true / yes / 1.
» "-": The logical value false / no / 0.
» "error": Used to advice a tag to return an error.
» "gmt": Greenwich Mean Time.
» "server": Local server time.
» "www": Universal Internet Time.

Number

Any combination of characters representing a valid numerical value. Exotic forms are not necessarily supported by all implementations.

There may be additional requirements for a number in a specific context (precision, range).

It's not defined what illegal numbers are evaluated to.

URL

An internet "uniform resource locator".

Set

A list of single characters.

File

The location an name of a file on the local server using an URL like syntax with a "/" to separate directories.

HTE supports the following special directories:
» "/": The project root directory.
» "./": The current directory, which is always the directory of the inmost HTE file processed (may be omitted).
» "../": The parent directory.
» "*/": The directory of the executed script.
» ":/": The directory of the outmost HTE file processed.
» "?/": The directory of the HTE library.
» "~/": The directory of the document containing the processed URL (not always available and appropriate).

Pattern

An expression to specify a list of files on the local server with the help of wildcard characters.

Posix+

The description of a date/time format as a combination of free text and the following placeholders:
» "%A": Day of the week (long).
» "%a": Day of the week (short).
» "%B": Month (long).
» "%b": Month (short).
» "%c": Date & time.
» "%d": Day ("01"-"31").
» "%H": Hour ("00"-"23").
» "%I": Hour ("01"-"12").
» "%j": Day ("001"-"366").
» "%M": Minute ("00"-"59").
» "%m": Month ("01"-"12").
» "%p": "am"/"pm".
» "%S": Second ("00"-"59").
» "%T": Universal internet time ("00000"-"99999").
» "%t": Universal internet time ("000"-"999").
» "%U": Week starting sunday ("00"-"53").
» "%W": Week starting monday ("00"-"53").
» "%w": Day of the week starting sunday ("0"-"6").
» "%X": Time.
» "%x": Date.
» "%Y": Year ("0000"-"9999").
» "%y": Year ("00"-"99").
» "%Z": Yime zone.
» "%%": "%".

Mask

The description of a return format as a combination of free text and the placeholders "%1", "%2", ... for the respective items.

Table

A sequence of records seperated with "\n".

Every record may consist of several fields seperated with "\t". When used to identify a record its first field is also known as the key.

There are the following internal HTE tables:
» "ENV": The web server parameters (accessed with "<!ENV>" "<!TABLE:ENV>").
» "PAR": The HTE parameters (accessed with "<!"key">" "<!SET>" "<!TABLE:PAR>").
» "VAR": A working table (accessed with "<!EACH>" "<!GET>" "<!OPEN>" "<!PUT>" "<!TABLE:VAR>").

HTE tags (ordered by priority of evaluation)

KeywordAttributeData typeDefault
"%" "*" "+" "-" "/" "\""0"number"0"
"1"number"1"
"APPEND""file"file
"string"string
"return"keyword: "error"
"CASE""string"string
"if", "if1", "if2", ...string
"then", "then1", "then2", ...string
"else"string
"CHR""number"number"10"
"COUNT""string"string
"what"string"\n"
"CREATE""file"file
"string"string
"return"keyword: "error"
"DATE""zone"keyword: "gmt" "server" "www""gmt"
"return"posix+"%Y-%m-%d"
"DECODE""string"string
"DELETE""file"file
"return"keyword: "error"
"DIR""pattern"pattern"*"
"EACH""key1", "key2", ...key
"do"string
"ENCODE""string"string
"ENV""key"key
"default"string
"EXEC""command"command
"local"keyword: "+" "-""-"
"return"keyword: "+" "-""+"
"EXTRACT""string"string
"number"number"1"
"separator"string"\n"
"FILTER""string"string
"set"setinvalid filename characters
"with"string
"FIND""string"string
"what"string
"number"number"1"
"FOR""key"key
"first"number"1"
"last"number"0"
"step"number"1"
"do"string
"GET""key"key
"default"string
"HERE"
"INCLUDE""file"file
"default"string
key1, key2, ...string
"JAVASCRIPT""command"command
"LENGTH""string"string
"LIST""table"table
"return"mask"[%1]=[%2]<BR>"
"LOG""return"mask"%3: %2"
"LOWER""string"string
"MAIL""from"stringip-address"("host")"
"to"string
"cc"string
"bcc"string
"subject"stringurl
"text"string
"return"keyword: "error"
"ME"
"MID""string"string
"first"number"1"
"last" | "length"number"ø"
"OPEN""file"filestandard
"return"keyword: "error"
"PASSWORD"role, role1, role2, ...string
"then"string
"else"string
"PERL""command"command
"PUT""key"key
"string"string
"RANDOM""base"number"1"
"count"number"1"
"REF"
"REPLACE""string"string
"what", "what1", "what2", ...string
"with", "with1", "with2", ...string
"SET""key"key
"string"string
"SQL""command"command
"return"keyword: "+" "-""+"
"TABLE:ENV"
"TABLE:PAR"
"TABLE:VAR"
"TIME""zone"keyword: "gmt" "server" "www""gmt"
"return"posix+"%H:%M:%S"
"TOP"
"UPPER""string"string
"URL""url"urlactual url
key1, key2, ...string
key"default"string




"SMS" (proposal)"to"string
"string"string

Security considerations

Any information delivered from the client side using parameters must not be parsed.

For public use some of the functionality might be disabled or restricted due to security reasons including:
» Tags writing ("<!APPEND>" "<!CREATE>" "<!DELETE>" "<!OPEN>") or reading ("<!INCLUDE>") files.
» Tags executing shell ("<!EXEC>"), service ("<!SQL>") or internal ("<!PERL>") commands.
» Tags revealing confidential information ("<!DIR>" "<!EACH>" "<!ENV>" "<!TABLE:ENV>" "<!TABLE:PAR>" "<!TABLE:VAR>").
» Tags for special services ("<!MAIL>").
An error message ("Not available" / "Permission denied") must be returned instead where appropriate.

Final remarks

This specification was published although (or because) it is still in a state of ongoing enhancement.
Its latest and only relevant version can be found at
http://from.ch/lexicon/hte/.
Comments are welcome to info_20100905@from.ch.

Revision history

» 2000-02-10 Jochen WALZ: Inserted attribute: <!EXEC local>.
» 1999-08-03 Jochen WALZ: Inserted tag: <!DECODE> <!ENCODE> <!FILTER>.
» 1999-07-21 Jochen WALZ: Modified tag: <!PASSWORD>.
» 1999-07-17 Jochen WALZ: Inserted attribute: <!INCLUDE default>.
» 1999-07-16 Jochen WALZ: Inserted tag: <!PASSWORD> <!>.
» 1999-07-12 Jochen WALZ: Inserted tag: <!CHR>.
» 1999-07-12 Jochen WALZ: Deleted tag: <!BR>.
» 1999-07-07 Jochen WALZ: Inserted attribute: <!INCLUDE key1, key2, ...>.
» 1999-07-07 Jochen WALZ: Inserted tag: <!LOG>.
» 1999-06-14 Jochen WALZ: New major release - old revision history cleared.

Rechtliches

Das Folgende, meinten unsere Anwälte, sollte schliesslich auch noch gesagt werden:

© 1999-2010 from.ch GmbH - alle Rechte vorbehalten.

aus.chTM und from.chTM sind Warenzeichen der from.ch GmbH. Andere Bezeichnungen sind möglicherweise Warenzeichen anderer Herkunft.

Dieses Dokument wird veröffentlich "wie bestehend". Weder from.ch GmbH noch die Autoren können garantieren, dass die enthaltenen Informationen korrekt sind. Jedoch sind wir von deren Richtigkeit zum Zeitpunkt der Erstellung überzeugt.

Diese Seite enthält möglicherweise Verknüpfungen zu anderen Seiten im Internet. Für alle diese externen Links gilt: Da wir weder Einfluss auf Gestaltung und Inhalte der verlinkten Seiten haben noch uns deren Inhalte zu Eigen machen distanzieren wir uns hiermit ausdrücklich von allen Inhalten aller verlinkten Seiten. Verweise zu Seiten, die gegen geltendes Recht sowie Anstand, Sitte und Moral verstossen werden von uns entfernt sobald wir davon Kenntnis erlangen.