Contact | Privacy | Datenschutzerklärung | Impressum

defhtml Tag

Format: <defhtml >

Context: defhtml must be used inside a def or defenv tag (after a inherit tag if present).

Purpose: The syntax of heitml user-defined tags is an extension of the HTML/XML syntax, since arbitrary expressions are allowed as parameters. When creating new pages this is fine, since tags with dynamic parameters can be written very easily. However, if existing HTML code is reused, this might cause problems.

heitml parses the calls of tags defined with defhtml in HTML compatibility mode. This means according to the following syntax
Syntax:
ActualParameterlist'::= ( ParameterName [ = ( String | ( Expr ) ]) * .

  • no positional parameters are allowed
  • parameter values are interpreted as strings rather than expressions
  • parameters without parameter value are interpreted as HTML-Bools and pass their parameter name as value
  • parameter values enclosed in brackets are interpreted as expressions (as extension to HTML/XML)

It is a good idea to use defhtml for all redefined HTML tags.

Example:
To redefine the paragraph tag in a way that the following HTML code still works defhtml is necessary:

<P ALIGN=CENTER>

Without the defhtml tag in the definition of the p tag, heitml interprets CENTER as a variable.

The following example illustrates the differences of HTML and heitml parameter parsing.

Example:

input:resulting output:
<def myheitml @p ...>
   <?p><br></def>
<def myhtml   @p ...; defhtml>
   <?p><br></def>

<myheitml a=5+6 b=SrvTime SrvDate>
<myhtml   a=5+6 b=SrvTime SrvDate>
<let mydir=40; test=5><p>
<myheitml   href=mydir/test b=(5+6) >
<myhtml     href=mydir/test b=(5+6) >



   (a=11, b=22923614, [2]=20240319)
(a="5+6", b="SrvTime", SrvDate="SrvDate")

(href=8, b=11)
(href="mydir/test", b=11)


This page was dynamically generated by the web application development tool RADpage of H.E.I. Try the AJAX Article (in German) on www.h-e-i.de.
© 1996-2024 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
Programming
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    Expressions
    Objects
    Methods
    Classes
    heitml Tags
      ? Tag
      assign Tag
      break Tag
      callenv Tag
      dbdatabase Tag
      dbquery Tag
      dbupdate Tag
      def Tag
      defautoclose Tag
      defbody Tag
      defclass Tag
      defcontpara Tag
      defenv Tag
      defhtml Tag
      definpara Tag
      defpara Tag
      defremovecdata Tag
      deftranspara Tag
      defwysiwyg Tag
      for Tag
      forin Tag
      forsep Tag
      if Tag
      elsif Tag
      else Tag
      include Tag
      includeonce Tag
      inherit Tag
      let Tag
      mail Tag
      return Tag
      shell Tag
      while Tag
      writefile Tag
      \ Tag
    heitml Functions
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    Sessions
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  Tutorial
  New Features
  heitml 1
User Guide
Services
Privacy
Datenschutz
 
Contact / Impressum