uTags - Tools For uHTML Tag Checks

General Overview

The library uTags provides tags and functions to check the existence of an particular uHTML-tag or function. This library is thought mainly as a debug tool for the designer and rarely of practical use in working websites.

To install the module project local, copy it into the uHTML subdirectory of the script-directory of the website. To install it globally, copy it into the uHTML subdirectory of a perl-library directory.

Terms of Use

It is allowed to use this library under the actual GNU General Public License. The name of this library and it's author is to be named in all derivations.

Requirements

The uTags library requires the uHTML::listfuncs library and the main uHTML library.

 

List of uHTML tags provided by the uTags library

ListTags, ListVars, TestTag, TestVar

List of attribute variables and functions provided by the uTags library

ListTags, ListVars, TestTag, TestVar

 

 

uHTML tags provided by the std library

ListTags

Overview

The ListTags tag lists all uHTML tags with associated program code.

Attributes

head="text"
The attribute head defines the text preceding the tag list.
join="text"
The attribute join defines the text between two consecutive tag names.
tail="text"
The attribute tail defines the text following the tag list.

Example

<ListTags head="Known tags: " join=", " tail=".">
up↑
ListVars

Overview

The ListVars tag lists all known uHTML attribute variables.

Attributes

head="text"
The attribute head defines the text preceding the variables list.
join="text"
The attribute join defines the text between two consecutive variables names.
tail="text"
The attribute tail defines the text following the variables list.

Example

<ListVars head="Known variables: " join=", " tail=".">
up↑
TestTag

Overview

The TestTag tag tests if a particular uHTML tag has program code associated with it.

Attributes

name="text"
Name of the tested tag.
msg="text"
Message displayed in case the tag name has code connected to it.

Example

<TestTag name="if" msg="<b>if</b> is defined.">
up↑
TestVar

Overview

The TestVar tag tests if a particular uHTML attribute variable is known.

Attributes

name="text"
Name of the tested variable.
msg="text"
Message displayed in case the variable name is known.

Example

<TestVar name="RepeatValue" msg="<b>RepeatValue</b> is defined as variable.">
up↑

Attribute variables and functions provided by the uTags library

$ListTags(head,join,tail)

Overview

The ListTags function returns a list of all uHTML tags associated with program code.

Parameters

head
The parameter head defines the text preceding the tag list.
join
The parameter join defines the text between two consecutive tag names.
tail
The parameter tail defines the text following the tag list.

Example

<uList elements="$ListTags('',',','')">
  …
</uList>
up↑
$ListVars(head,join,tail)

Overview

The ListVars function returns a list of all known uHTML attribute variables.

Parameters

head
The parameter head defines the text preceding the variables list.
join
The parameter join defines the text between two consecutive variables names.
tail
The parameter tail defines the text following the variables list.

Example

<uList elements="$ListVars('',',','')">
  …
</uList>
up↑
$TestTag(name,ret)

Overview

The $TestTag function tests if a particular uHTML tag has program code associated with it.

Parameters

name
Name of the tested tag.
msg
Value returned in case the tag name has code connected to it.

Example

<if cond="$TestVar(include,1)">Tag "include" is defined.</if>
up↑
$TestVar(name,ret)

Overview

The $TestVar function tests if a particular uHTML attribute variable is known.

Parameters

name
Name of the tested attribute variable.
ret
Value returned in case the attribute variable name is known.

Example

<if cond="$TestVar(RepeatValue,1)">RepeatValue is defined.</if>
up↑