AxKit::XSP::Util - XSP util: taglib.
Add the util: namespace to your XSP <xsp:page
> tag:
<xsp:page language="Perl" xmlns:xsp="http://apache.org/xsp/core/v1" xmlns:util="http://apache.org/xsp/util/v1" >
And add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::XSP::Util
The XSP util: taglib seeks to add a short list of basic utility functions to the eXtesible Server Pages library. It trivializes the inclusion of external fragments and adds a few other useful bells and whistles.
Most of of the tags require some sort of "argument" to be passed (e.g.
<util:include-file
> requires the name of the file that is to be
read). Unless otherwise noted, all tags allow you to pass this
information either as an attribute of the current element or as the
text node of an appropriately named child.
Thus, both:
<util:include-file name="foo.xml" />
and
<util:include-file> <util:name>foo.xml</util:name> </util:include-file>
are valid.
<util:include-file
>
Provides a way to include an XML fragment from a local file into the current parse tree. Requires a name argument. The path may be relative or absolute.
<util:include-uri
>
Provides a way to include an XML fragment from a (possibly) remote URI. Requires an href argument.
<util:get-file-contents
>
Provides a way to include a local file as plain text. Requires a name argument. The path may be relative or absolute.
<util:include-expr
>
Provides a way to include an XML fragment from a scalar variable. Note that this tag may only pass the required expr argument as a child node. Example:
<util:include-expr> <xsp:expr>$xml_fragment</xsp:expr> </util:include-expr>
<util:time
>
Returns a formatted time/date string. Requires a format attribute. The format is defined using the standard strftime() syntax.
Kip Hampton, khampton@totalcinema.com
AxKit.