Chapter 3: Tags

This chapter describes each of the tag groups that are currently available in the default xvl installation. The use of each of the tag groups and the modules they are implemented in is completely optional, as is the creation and installation of new modules. So, this list is always going to be incomplete.

3.1: args

3.1.1: <args:get/>

Description

<args:get>. An extremely powerful tag that takes a named table and can create properties by key/value in all of its child nodes [not recursively - this is deliberate], or it can create substitution nodes where any child node with the same key name will be replaced with the value [which does work recursively].

<args:get> also has a mode where each key/value pair in a named table can be used to create a new two-entry table with each key and value as its only two entries, which are then actioned on each of the child nodes.

Examples

Closest conceptual equivalent

it's basically looking up records in a database, and then turning each individual record into its own mini-database, where the record is just the key/value pair.

TODO

[instead of using apache tables as the means to store the args data, use an in-memory XML document.]

3.1.2: <args:set/>

Description

The reverse of <args:set/>.

3.2: auth

This section describes user authentication related tags, for account creation, login and logout.

3.2.1: <auth:login/>

<auth:login/> checks the user's password, hands them a cookie, which gives the site just enough state information to not have to ask them their password on every single page page.

Has been abstracted / divorced from the rest of the code to make it possible to replace login/ with, say, Unix or Apache-specific User Authorisation methods.

3.3: cert

This section describes the certification tags. A lot of these are still [inefficiently] hard-coded in cert_maint.c, which has been officially classified as a Bad Thing...

3.3.1: <cert:check/>

Description

<cert:check>. Checks that a user has a Certification of a specific type above a specific level. The cached results are read and used: the <cert:check> does not do the [potentially expensive] calculations on-demand. To generate a certification calculation, use <tm:calc/>.

Examples

Closest conceptual equivalent

Evaluation of an Access Control Entry (ACE, from which ACLs - Access Control Lists - are constructed).

3.4: expr

This section describes the logic-evaluation module. It includes an expression-evaluation, an if/then/else mechanism, and a while of some kind loop is planned.

3.4.1: <expr:eval/>

Description

<expr:eval>. I was getting fed up of the number of hard-coded expression evaluations, so added a tag that returns either "true" or empty string [nothing]. has type="or", "and", "not" and "equal" properties which act as hopefully expected!.

Examples

Closest conceptual equivalent

sh shell-script expression evaluations. Assumed to be used in conjunction with the <expr:if/> tag, although if you use <expr:eval/> on its own, it is assumed that you do not mind the word "true" occasionally appearing in your output stream.

TODO

planned: type="lessthan" and type="greater", which will convert their string contents to numbers and compare them.

3.4.2: <expr:if/>

Description

<expr:if/>. Surprise, surprise. works in combination with immediate-child-nodes. all children up to a <then/> or <else/> are evaluated until one of them returns a string with actual characters in it [i.e. not white space].

After that, all other child nodes are skipped until [or if] a <then/> or <else/> child node is found. if there was at least one non-white-space node up to that point, the child nodes of <then/> are evaluated [if it exists]. otherwise, the child nodes of <else/> are evaluated [if it exists].

Even with no <else/> or <then/> nodes, <expr:if/> has enough logic to be useful. to somebody.

Examples

TODO

[consider replacing <else/> with <expr:else/> and likewise for then. MCSE XML (must consult some experts in XML)].

3.5: log

3.6: rss

3.7: sock

3.8: text

3.9: tm

This section describes the Trust Metric evaluation module, which provides a form of Access Control.

3.9.1: <tm:calc/>

Description

<tm:calc>. The entire reason this project was started: Trust Metric Calculation. This will go walkabout all over the site database, reading in Certifications from profiles, performing a number of Maximum Flow Graph Evaluations and then outputting the results to an XML results-cache file. To be used in conjunction with various [to a lesser or greater extent, hard-coded] tags such as <cert:check/>.

Examples

Closest conceptual equivalent

Closest conceptual equivalent: Hierarchical Access Control Lists (ACLs). Aka HACLs or HACs. (only kidding).

TODO

A future modification to this tag will include loading of remote profiles from other sites. Additionally, Digital Signatures will be validated on user's Certifications.