Common Lisp Package: NET.ACCELERATION.TALCL-TEST

README:

FUNCTION

Private

$ tal reader (STREAM CHAR)

The $ char reader for tal expressions. This just tries to smooth over inconsistancies encountered by using $var-name in tal:foo attributes and regular foo attributes

%CALL-TEMPLATE-WITH-TAL-ENVIRONMENT (TAL-FN ENV)

This will call a template-fn with all the tal-environment variables bound into the lisp dynamic environment.

CALL-LAMBDA-WITH-DEFAULT-MISSING-VALUE (LAMBDA)

If you encounter an unbound template variable and we have a *default-missing-template-value*, invoke the set-value restart with that default see also: call-lambda-with-default-missing-value which sets up the restart

CALL-LAMBDA-WITH-UNBOUND-VARIABLE-RESTARTS (LAMBDA)

When you enconter an unbound variable while executing a template function, provide a restart to bind that variable so that the template can be executed see also: call-lambda-with-default-missing-value which will invoke this restart with *default-missing-template-value* if there is one see also: with-missing-value-handler which shortcuts the rather tedious handler-bind for this into a bare minimum handler

COMPILE-TAL-STRING-TO-LAMBDA (STRING &OPTIONAL (EXPRESSION-PACKAGE *PACKAGE*))

Returns the source code for the tal function form the tal text STRING.

DOS-SAFE-READ-LINE (STREAM &OPTIONAL (EOF-ERROR-P T) EOF-VALUE RECURSIVE-P)

readline that can read unix or dos lines

LOG-TIME (&OPTIONAL (TIME (GET-UNIVERSAL-TIME)) STREAM)

returns a date as ${mon}/${d}/${y} ${h}:${min}:{s}, defaults to get-universal-time

MAKE-EXTENDED-XMLS-BUILDER (&KEY (INCLUDE-DEFAULT-VALUES T) (INCLUDE-NAMESPACE-URI T))

Make a XMLS style builder. When 'include-namespace-uri is true a modified XMLS tree is generated that includes the element namespace URI rather than the qualified name prefix and also includes the namespace URI for attributes.

PARSE-TALABLE-STRING (VALUE-STRING)

Parser a TAL attribute expression, returns a form for building the expression at run time.

READ-STRING-FROM-FILE (PATHNAME &KEY (BUFFER-SIZE 4096) (ELEMENT-TYPE 'CHARACTER) (EXTERNAL-FORMAT DEFAULT))

Return the contents of PATHNAME as a fresh string. The file specified by PATHNAME will be read one ELEMENT-TYPE element at a time, the EXTERNAL-FORMAT and ELEMENT-TYPEs must be compatible. The EXTERNAL-FORMAT parameter will be passed to ENCODING-KEYWORD-TO-NATIVE, see ENCODING-KEYWORD-TO-NATIVE to possible values.

SPECIFIED-ATTRIBUTE* (PREFIX LNAME VALUE &OPTIONAL QNAME)

A copy of cxml:attribute* that sets specified-p correctly TODO: cxml:attribute* should probably set this by default or accept it as an optional arg. Push this upstream @arg[prefix]{Namespace prefix, a string.} @arg[lname]{Local name, a string.} @arg[value]{Any value understood by @fun{unparse-attribute}, in particular strings.} @return{undocumented} Collects an attribute for the start tag that is currently being written. This function may only be called during the extent of a use of @fun{with-element} or @fun{with-element*}, and only before the first child node has been written. An attribute for the current element is recorded using the namespace prefix and local name specified by arguments. @var{prefix} is resolved to a namespace URI using the bindings established by @fun{with-namespace}, and that namespace URI is used for the attribute.

STARTS-WITH (SEQUENCE PREFIX &KEY (TEST #'EQL) (RETURN-SUFFIX NIL))

Test whether the first elements of SEQUENCE are the same (as per TEST) as the elements of PREFIX. If RETURN-SUFFIX is T the functions returns, as a second value, a displaced array pointing to the sequence after PREFIX.

TAL-TEMPLATE.FILE-NAME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TAL-TEMPLATE.FUNCTION (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TAL-TEMPLATE.LAST-LOAD-TIME (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

TRANSFORM-LXML-FORM-IN-SCOPE (FORM)

Creates a new scope (ie: for def) and processes a form inside it

TRANSFORM-LXML-TREE-IN-SCOPE (TREE)

Creates a new scope (ie: for def) and processes a tree of children inside it

Undocumented

%EVAL (TAG)

%GET-TAL-TEMPLATE-FN (FILE-NAME GENERATOR &AUX (*LOG* (LOG-FN GENERATOR)))

BUFFERED-TEMPLATE-CALL (TEMPLATE-FUNCTION ENV)

COMPILE-TAL-PARSE-TREE-TO-LAMBDA (PARSE-TREE &OPTIONAL (EXPRESSION-PACKAGE *PACKAGE*) TREE-OR-FORMS?)

COPY-TAL-TEMPLATE (INSTANCE)

DOM-WALK-HELPER (TREE)

EASY-TEMPLATE-EXAMPLE

EASY-TEMPLATE-EXAMPLE-2

ELIMINATE-..-IN-PATH (NAME)

ERROR-TAL-EXPRESSION-EOF (EXPRESSION &OPTIONAL ERROR)

EXAMPLE-WINDOW-ENV

FIND-EXPRESSION-LINE/COL-NUMBER (EXPR)

FIND-HANDLER-NAMED (NAME)

GATHER-ATTRIB-FORMS (ATTRIBUTES)

INTERN-TAL-STRING (S)

MAKE-OUTPUT-SINK (STREAM &KEY CANONICAL INDENTATION (CHAR-P T))

MAKE-TAL-TEMPLATE (&KEY ((LAST-LOAD-TIME DUM40) NIL) ((FILE-NAME DUM41) NIL) ((FUNCTION DUM42) NIL))

PARSE-TAL-ATTRIBUTE-VALUE (VALUE-STRING)

PARSE-TAL-BODY-CONTENT (VALUE-STRING)

PROCESS-EXAMPLE-WINDOW-TO-STRING

PROCESS-EXAMPLE-WINDOW-TO-STRING-USING-DOM-DOCUMENT-PROCESSING-INSTRUCTIONS

PROCESS-EXAMPLE-WINDOW-TO-STRING-USING-DOM-DOCUMENTS-AND-DOM-SUBTREES

READ-TAL-FILE-INTO-STRING (PATHNAME)

RUN-TESTS (&KEY SUITES TESTS (USE-DEBUGGER T))

TAL-ERROR (MESSAGE &REST ARGS)

TAL-LOG (MESSAGE &REST ARGS)

TAL-LOG.INFO (MESSAGE &REST ARGS)

TAL-RUNTIME-ERROR (ORIGINAL-ERROR MESSAGE &REST ARGS)

TAL-TEMPLATE-P (OBJECT)

SETFTAL-TEMPLATE.FILE-NAME (NEW-VALUE INSTANCE)

SETFTAL-TEMPLATE.FUNCTION (NEW-VALUE INSTANCE)

SETFTAL-TEMPLATE.LAST-LOAD-TIME (NEW-VALUE INSTANCE)

TAL-WARN (MESSAGE &REST ARGS)

TRANSFORM-LXML-REGULAR-TAG (TAG-NAME ATTRIBUTES BODY)

MACRO

Private

AIF (TEST THEN &OPTIONAL ELSE)

Just like IF-BIND but the var is always IT.

AWHEN (TEST &BODY BODY)

Just like when expect the symbol IT will be bound to the result of TEST in BODY.

BUFFER-XML-OUTPUT ((&OPTIONAL STREAM) &BODY BODY)

buffers out sax:events to a sting xml parameters like <param:foo param:type="string"><div>bar</div></param:foo> are requested to be strings (presumably for string processing)

IF-BIND (VAR TEST &BODY THEN/ELSE)

Anaphoric IF control structure. VAR (a symbol) will be bound to the primary value of TEST. If TEST returns a true value then THEN will be executed, otherwise ELSE will be executed.

LOG-AROUND ((LOG-NAME MESSAGE &REST ARGS) &BODY BODY)

Logs the beginning and end of a body. ARGS are evaluated twice

REBINDING (BINDINGS &BODY BODY)

Bind each var in BINDINGS to a gensym, bind the gensym to var's value via a let, return BODY's value wrapped in this let. Evaluates a series of forms in the lexical environment that is formed by adding the binding of each VAR to a fresh, uninterned symbol, and the binding of that fresh, uninterned symbol to VAR's original value, i.e., its value in the current lexical environment. The uninterned symbol is created as if by a call to GENSYM with the string denoted by PREFIX - or, if PREFIX is not supplied, the string denoted by VAR - as argument. The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

TIME-AND-LOG-AROUND ((LOG-NAME MESSAGE &REST ARGS) &BODY BODY)

Logs the beginning and end of a body. ARGS are evaluated twice

WHEN-BIND (VAR TEST &BODY BODY)

Just like when except VAR will be bound to the result of TEST in BODY.

WITH-INPUT-FROM-FILE ((STREAM-NAME FILE-NAME &REST ARGS &KEY (DIRECTION NIL DIRECTION-PROVIDED-P) (EXTERNAL-FORMAT DEFAULT) &ALLOW-OTHER-KEYS) &BODY BODY)

Evaluate BODY with STREAM-NAME bound to an input-stream from file FILE-NAME. ARGS is passed directly to open.

WITH-UNIQUE-NAMES ((&REST BINDINGS) &BODY BODY)

Evaluate BODY with BINDINGS bound to fresh unique symbols. Syntax: WITH-UNIQUE-NAMES ( [ var | (var x) ]* ) declaration* form* Executes a series of forms with each VAR bound to a fresh, uninterned symbol. The uninterned symbol is as if returned by a call to GENSYM with the string denoted by X - or, if X is not supplied, the string denoted by VAR - as argument. The variable bindings created are lexical unless special declarations are specified. The scopes of the name bindings and declarations do not include the Xs. The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

Undocumented

ADWTEST (NAME (&REST ARGS) &BODY BODY)

SPEED-TEST (NAME (&REST ARGS) &BODY BODY)

SPEED-TEST-ITERS (NAME ITERS (&REST ARGS) &BODY BODY)

WITH-TAL-COMPILATION-UNIT (PATHNAME &BODY BODY)

WITH-THIS-SINK ((SINK) &BODY BODY)

GENERIC-FUNCTION

Private

Undocumented

%EMIT-TAGGED-CONTENT (VALUE &OPTIONAL ESCAPE)

ADD-TAL (G NAME FN)

CLEAR-BUFFER (O)

FORMAT-ARGS (CONDITION)

SETFFORMAT-ARGS (NEW-VALUE CONDITION)

FORMAT-CONTROL (CONDITION)

SETFFORMAT-CONTROL (NEW-VALUE CONDITION)

ORIGINAL-ERROR (CONDITION)

SETFORIGINAL-ERROR (NEW-VALUE CONDITION)

START-BUFFERING (O)

STOP-BUFFERING-AND-FLUSH (O &OPTIONAL OUTPUT-SINK)

SLOT-ACCESSOR

Private

BUFFER (OBJECT)

The events buffered so far

SETFBUFFER (NEW-VALUE OBJECT)

The events buffered so far

BUFFERING (OBJECT)

Is this currently buffering

SETFBUFFERING (NEW-VALUE OBJECT)

Is this currently buffering

FLUSHING (OBJECT)

Is this currently flushing

SETFFLUSHING (NEW-VALUE OBJECT)

Is this currently flushing

LOG-FN (OBJECT)

A log-fn that accepts a string and writes it to the log

SETFLOG-FN (NEW-VALUE OBJECT)

A log-fn that accepts a string and writes it to the log

Undocumented

CACHE (OBJECT)

SETFCACHE (NEW-VALUE OBJECT)

NS-TEST (OBJECT)

SETFNS-TEST (NEW-VALUE OBJECT)

TALS (OBJECT)

SETFTALS (NEW-VALUE OBJECT)

URI-TO-PACKAGE (OBJECT)

SETFURI-TO-PACKAGE (NEW-VALUE OBJECT)

VARIABLE

Private

*EXPRESSION-PACKAGE*

The value of *PACKAGE* when tal attribute expressions and for looking up symbols in the environment.

*LOG*

A log-fn that accepts a string and writes it to the log

*TAL-GENERATOR*

The generator to be used during compilation.

*TAL-TRUENAME*

The truename of the tal file being compiled.

*TALABLE-STRINGS*

Whether or not to treat regular attributes and contents as talable strings.

Undocumented

*EXAMPLE-GENERATOR*

*NAME-BEING-COMPILED*

*TAL-ATTRIBUTE-HANDLERS*

*TAL-TAG-HANDLERS*

*TAL-TEMPLATES*

*TEST-GENERATOR*

CLASS

Private

EXTENDED-XMLS-BUILDER

an xmls builder that includes comments as (:comment () comment-text) nodes

Undocumented

BUFFERING-SINK

INTERNER

TAL-TEMPLATE

TAL-TEST-GENERATOR

TEMPLATE-NODE

CONDITION

Private

Undocumented

TAL-COMPILATION-CONDITION

TAL-COMPILATION-ERROR

TAL-COMPILATION-WARNING

TAL-UNEXPECTED-EOF-COMPILATION-ERROR