parse-procs.tcl

ADP to Tcl Compiler for the ArsDigita Templating System,

Location:
packages/acs-templating/tcl/parse-procs.tcl
Authors:
Karl Goldstein
Stanislav Freidin
Jon Salz
CVS Identification:
$Id: parse-procs.tcl,v 1.67 2024/09/11 06:15:48 gustafn Exp $

Procedures in this file

Detailed information

template::adp_abort (public)

 template::adp_abort

Terminates processing of a template and throws away all output.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

template::adp_append_code (public)

 template::adp_append_code code [ nobreak ]

Adds a line of code to the Tcl output from the compiler. Called by basically any adp custom tag implementation and also from developer support.

Parameters:
code (required)
A line of Tcl code
nobreak (optional)
Options:
-nobreak
Flag indicating that code should be appended to the current last line rather than adding a new line, for cases where code must continue on the same line, such as the "else" tag.

Partial Call Graph (max 5 caller/called nodes):
%3 test_adp_parse_tags adp_parse_tags (test acs-templating) template::adp_append_code template::adp_append_code test_adp_parse_tags->template::adp_append_code test_template_widget_file template_widget_file (test acs-templating) test_template_widget_file->template::adp_append_code ds_adp_end_box ds_adp_end_box (public) ds_adp_end_box->template::adp_append_code ds_adp_start_box ds_adp_start_box (public) ds_adp_start_box->template::adp_append_code packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl packages/acs-templating/tcl/tag-init.tcl->template::adp_append_code publish::process_tag publish::process_tag (private) publish::process_tag->template::adp_append_code template::adp_append_string template::adp_append_string (private) template::adp_append_string->template::adp_append_code

Testcases:
template_widget_file, adp_parse_tags

template::adp_append_string (private)

 template::adp_append_string s

Adds a line of code that appends a string to the Tcl output from the compiler.

Parameters:
s (required)
A string containing markup that does not contain any embedded ATS tags. Variable references and procedure calls are interpreted as for any double-quoted string in Tcl.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl template::adp_append_string template::adp_append_string packages/acs-templating/tcl/tag-init.tcl->template::adp_append_string template::adp_compile_chunk template::adp_compile_chunk (public) template::adp_compile_chunk->template::adp_append_string template::adp_tag_init template::adp_tag_init (private) template::adp_tag_init->template::adp_append_string template::adp_append_code template::adp_append_code (public) template::adp_append_string->template::adp_append_code

Testcases:
No testcase defined.

template::adp_array_variable_regexp (public)

 template::adp_array_variable_regexp

The regexp pattern used to find adp array variables in a piece of text (i.e. @array_name.variable_name@). Captures the character preceding the first @ in \1, the array_name in \2, and variable_name in \3

Author:
Peter Marklund <peter@collaboraid.biz>
Created:
25 October 2002

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_array_variable_regexp template::adp_array_variable_regexp test_template_variable->template::adp_array_variable_regexp lang::util::convert_adp_variables_to_percentage_signs lang::util::convert_adp_variables_to_percentage_signs (private) lang::util::convert_adp_variables_to_percentage_signs->template::adp_array_variable_regexp lang::util::convert_percentage_signs_to_adp_variables lang::util::convert_percentage_signs_to_adp_variables (private) lang::util::convert_percentage_signs_to_adp_variables->template::adp_array_variable_regexp lang::util::replace_adp_text_with_message_tags lang::util::replace_adp_text_with_message_tags (public) lang::util::replace_adp_text_with_message_tags->template::adp_array_variable_regexp template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_array_variable_regexp

Testcases:
template_variable

template::adp_array_variable_regexp_literal (public)

 template::adp_array_variable_regexp_literal

adp_array_variable_regexp's pattern augmented by "literal"

Author:
Gustaf Neumann
Created:
December 2012

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_array_variable_regexp_literal template::adp_array_variable_regexp_literal test_template_variable->template::adp_array_variable_regexp_literal template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_array_variable_regexp_literal

Testcases:
template_variable

template::adp_array_variable_regexp_noi18n (public)

 template::adp_array_variable_regexp_noi18n

adp_array_variable_regexp's pattern augmented by "noi18n"

Author:
Gustaf Neumann
Created:
June 2015

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_array_variable_regexp_noi18n template::adp_array_variable_regexp_noi18n test_template_variable->template::adp_array_variable_regexp_noi18n template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_array_variable_regexp_noi18n

Testcases:
template_variable

template::adp_array_variable_regexp_noquote (public)

 template::adp_array_variable_regexp_noquote

adp_array_variable_regexp's pattern augmented by "noquote"

Author:
Dirk Gomez <openacs@dirkgomez.de>
Created:
12 February 2003

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_array_variable_regexp_noquote template::adp_array_variable_regexp_noquote test_template_variable->template::adp_array_variable_regexp_noquote lang::util::convert_adp_variables_to_percentage_signs lang::util::convert_adp_variables_to_percentage_signs (private) lang::util::convert_adp_variables_to_percentage_signs->template::adp_array_variable_regexp_noquote lang::util::convert_percentage_signs_to_adp_variables lang::util::convert_percentage_signs_to_adp_variables (private) lang::util::convert_percentage_signs_to_adp_variables->template::adp_array_variable_regexp_noquote lang::util::replace_adp_text_with_message_tags lang::util::replace_adp_text_with_message_tags (public) lang::util::replace_adp_text_with_message_tags->template::adp_array_variable_regexp_noquote template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_array_variable_regexp_noquote

Testcases:
template_variable

template::adp_compile (public)

 template::adp_compile [ -file file ] [ -string string ]

Converts an ADP template into a chunk of Tcl code. Caching this code avoids the need to reparse the ADP template with each request.

Switches:
-file (optional)
The filename of the source
-string (optional)
string to be compiled
Returns:
The compiled code. Valid options are either -string or -file

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_dimensional ad_dimensional (test acs-templating) template::adp_compile template::adp_compile test_ad_dimensional->template::adp_compile test_template_widget_file template_widget_file (test acs-templating) test_template_widget_file->template::adp_compile test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->template::adp_compile lang::message::lookup lang::message::lookup (public) template::adp_compile->lang::message::lookup lang::util::localize lang::util::localize (public) template::adp_compile->lang::util::localize template::adp_array_variable_regexp template::adp_array_variable_regexp (public) template::adp_compile->template::adp_array_variable_regexp template::adp_array_variable_regexp_literal template::adp_array_variable_regexp_literal (public) template::adp_compile->template::adp_array_variable_regexp_literal template::adp_array_variable_regexp_noi18n template::adp_array_variable_regexp_noi18n (public) template::adp_compile->template::adp_array_variable_regexp_noi18n general_comments_get_comments general_comments_get_comments (public) general_comments_get_comments->template::adp_compile packages/acs-api-browser/www/content-page-view.tcl packages/acs-api-browser/ www/content-page-view.tcl packages/acs-api-browser/www/content-page-view.tcl->template::adp_compile rp_handle_request rp_handle_request (private) rp_handle_request->template::adp_compile template::adp_init template::adp_init (public) template::adp_init->template::adp_compile template::cmp_page_filter template::cmp_page_filter (private) template::cmp_page_filter->template::adp_compile

Testcases:
ad_dimensional, template_widget_file, xowiki_test_cases

template::adp_compile_chunk (public)

 template::adp_compile_chunk chunk

Parses a single chunk of a template. A chunk is either the entire template or the portion of a template contained within a balanced tag. This procedure does not return the compiled chunk; compiled code is assembled in the template::parse_list variable.

Parameters:
chunk (required)
A string containing markup, potentially with embedded ADP tags.

Partial Call Graph (max 5 caller/called nodes):
%3 test_adp_parse_tags adp_parse_tags (test acs-templating) template::adp_compile_chunk template::adp_compile_chunk test_adp_parse_tags->template::adp_compile_chunk template::adp_append_string template::adp_append_string (private) template::adp_compile_chunk->template::adp_append_string template::adp_parse_string template::adp_parse_string (public) template::adp_compile_chunk->template::adp_parse_string template::adp_quote_chunk template::adp_quote_chunk (private) template::adp_compile_chunk->template::adp_quote_chunk packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl packages/acs-templating/tcl/tag-init.tcl->template::adp_compile_chunk template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_compile_chunk template::adp_parse_tags template::adp_parse_tags (public) template::adp_parse_tags->template::adp_compile_chunk template::template_tag_if_condition template::template_tag_if_condition (private) template::template_tag_if_condition->template::adp_compile_chunk

Testcases:
adp_parse_tags

template::adp_eval (public)

 template::adp_eval coderef

Evaluates a chunk of compiled template code in the calling stack frame. The resulting output is placed in __adp_output in the calling frame, and also returned for convenience.

Parameters:
coderef (required)
Returns:
The output produced by the compiled template code.

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_dimensional ad_dimensional (test acs-templating) template::adp_eval template::adp_eval test_ad_dimensional->template::adp_eval test_template_widget_file template_widget_file (test acs-templating) test_template_widget_file->template::adp_eval test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->template::adp_eval template::util::lpop template::util::lpop (public) template::adp_eval->template::util::lpop general_comments_get_comments general_comments_get_comments (public) general_comments_get_comments->template::adp_eval rp_handle_request rp_handle_request (private) rp_handle_request->template::adp_eval template::form::generate template::form::generate (private) template::form::generate->template::adp_eval template::list::render template::list::render (public) template::list::render->template::adp_eval template::list::render_row template::list::render_row (private) template::list::render_row->template::adp_eval

Testcases:
ad_dimensional, template_widget_file, xowiki_test_cases

template::adp_include (public)

 template::adp_include [ -uplevel uplevel ] src varlist

return the output of a Tcl/ADP pair as a string. adp_level is set to the calling procedure so that pass by reference works. and example of using this is in the search indexer for various content types:

    bookshelf::book::get -book_id $book_id -array bookdata
    set body [template::adp_include /packages/bookshelf/lib/one-book  [list &book "bookdata" base $base style feed]]
    
The [list &book "bookdata" ...] tells adp_include to pass the book array by reference to the adp include, where it is referred to via @book.field@.

Switches:
-uplevel (optional, defaults to "1")
how far up the stack should the adp_level be set to (default is the calling procedures level)
Parameters:
src (required)
should be the path to the Tcl/ADP pair relative to the server root, as with the src attribute to the include tag.
varlist (required)
a list of {key value key value ... } varlist can also be &var foo for things passed by reference (arrays and multirows)
Returns:
the string generated by the Tcl/ADP pair.
Author:
Jeff Davis davis@xarg.net
Created:
2004-06-02
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_page_contracts page_contracts (test acs-tcl) template::adp_include template::adp_include test_page_contracts->template::adp_include test_templates_and_scripts templates_and_scripts (test acs-templating) test_templates_and_scripts->template::adp_include template::adp_parse template::adp_parse (public) template::adp_include->template::adp_parse template::util::lpop template::util::lpop (public) template::adp_include->template::util::lpop template::util::url_to_file template::util::url_to_file (public) template::adp_include->template::util::url_to_file ad_dimensional ad_dimensional (public) ad_dimensional->template::adp_include apm_build_repository apm_build_repository (private) apm_build_repository->template::adp_include apm_git_build_repository apm_git_build_repository (private) apm_git_build_repository->template::adp_include bug_tracker::search::bug::datasource bug_tracker::search::bug::datasource (private) bug_tracker::search::bug::datasource->template::adp_include callback::user::workspace::impl::acs-subsite callback::user::workspace::impl::acs-subsite (private) callback::user::workspace::impl::acs-subsite->template::adp_include

Testcases:
page_contracts, templates_and_scripts

template::adp_init (public)

 template::adp_init type file_stub

Ensures that both data source Tcl files and compiled ADP templates are wrapped in procedures in the current interpreter. Procedures are cached in byte code form in the interpreter, so this is more efficient than sourcing a Tcl file or parsing the template every time. Also checks the modification time on the source file to ensure that the procedure is up-to-date.

Parameters:
type (required)
Either ADP (template) or Tcl (code)
file_stub (required)
The root (sans file extension) of the absolute path to the .adp or .tcl file to source.

Partial Call Graph (max 5 caller/called nodes):
%3 test_callgraph__bad_page_calls callgraph__bad_page_calls (test acs-api-browser) template::adp_init template::adp_init test_callgraph__bad_page_calls->template::adp_init apm_package_id_from_key apm_package_id_from_key (public) template::adp_init->apm_package_id_from_key parameter::get parameter::get (public) template::adp_init->parameter::get template::adp_compile template::adp_compile (public) template::adp_init->template::adp_compile template::iconset template::iconset (private) template::adp_init->template::iconset template::util::read_file template::util::read_file (public) template::adp_init->template::util::read_file template::adp_parse template::adp_parse (public) template::adp_parse->template::adp_init template::adp_prepare template::adp_prepare (private) template::adp_prepare->template::adp_init template::form::template template::form::template (private) template::form::template->template::adp_init template::list::render_filters template::list::render_filters (public) template::list::render_filters->template::adp_init template::list::render_form_filters template::list::render_form_filters (private) template::list::render_form_filters->template::adp_init

Testcases:
callgraph__bad_page_calls

template::adp_level (public)

 template::adp_level [ up ]

Get the stack frame level at which the template is being evaluated. This is used extensively for obtaining references to data sources, as well template objects such as forms and wizards

Parameters:
up (optional)
A relative reference to the "parse level" of interest. Useful in the context of an included template to reach into the stack frame in which the container template is being parsed, for accessing data sources or other objects. The default is the highest parse level.
Returns:
A number, as returned by [info level], representing the stack frame in which a template is being parsed.

Partial Call Graph (max 5 caller/called nodes):
%3 test_adp_level adp_level (test acs-templating) template::adp_level template::adp_level test_adp_level->template::adp_level Class ::Generic::Form Class ::Generic::Form (public) Class ::Generic::Form->template::adp_level Class ::xowiki::WikiForm Class ::xowiki::WikiForm (public) Class ::xowiki::WikiForm->template::adp_level ad_cache_returnredirect ad_cache_returnredirect (public) ad_cache_returnredirect->template::adp_level ad_form ad_form (public) ad_form->template::adp_level ad_set_element_value ad_set_element_value (private) ad_set_element_value->template::adp_level

Testcases:
adp_level

template::adp_levels (public, deprecated)

 template::adp_levels
Deprecated. Invoking this procedure generates a warning.

Returns:
all stack frame levels
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) template::adp_levels template::adp_levels template::adp_levels->ad_log_deprecated

Testcases:
No testcase defined.

template::adp_parse (public)

 template::adp_parse __adp_stub __args

Execute procedures to prepare data sources and then to output template. Assumes adp_level is set on entry. in general the public version template::adp_include should be used for generating strings from adp files.

Parameters:
__adp_stub (required)
The root (without the file extension) of the absolute path to the template and associated code.
__args (required)
One list containing any number of key-value pairs passed to an included template from its container. All data sources may be passed by reference.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_xowiki_test_cases xowiki_test_cases (test xowiki) template::adp_parse template::adp_parse test_xowiki_test_cases->template::adp_parse _ _ (public) template::adp_parse->_ ad_conn ad_conn (public) template::adp_parse->ad_conn ds_collection_enabled_p ds_collection_enabled_p (public) template::adp_parse->ds_collection_enabled_p ds_enabled_p ds_enabled_p (public) template::adp_parse->ds_enabled_p ds_page_fragment_cache_enabled_p ds_page_fragment_cache_enabled_p (public) template::adp_parse->ds_page_fragment_cache_enabled_p ad_return_template ad_return_template (public) ad_return_template->template::adp_parse adp_parse_ad_conn_file adp_parse_ad_conn_file (private) adp_parse_ad_conn_file->template::adp_parse content::deploy content::deploy (public, deprecated) content::deploy->template::adp_parse db_qd_get_fullname db_qd_get_fullname (public) db_qd_get_fullname->template::adp_parse packages/calendar/www/view-list-display.tcl packages/calendar/ www/view-list-display.tcl packages/calendar/www/view-list-display.tcl->template::adp_parse

Testcases:
xowiki_test_cases

template::adp_parse_tags (public)

 template::adp_parse_tags HTML

Parse the tags of the provided HTML text. This function is similar to

template::adp_compile -string $HTML
but it just performs tag substitution, but not ADP variable substitution, since this is done differently in some contextes on the provided HTML chunk. An example for specialized handling is the handling of instance attributes in xowiki.

Parameters:
HTML (required)
text containing potentially ADP tags
Returns:
HTML text with substituted ADP tags

Partial Call Graph (max 5 caller/called nodes):
%3 test_adp_parse_tags adp_parse_tags (test acs-templating) template::adp_parse_tags template::adp_parse_tags test_adp_parse_tags->template::adp_parse_tags ad_log ad_log (public) template::adp_parse_tags->ad_log template::adp_compile_chunk template::adp_compile_chunk (public) template::adp_parse_tags->template::adp_compile_chunk Class ::xowf::test_item::AssessmentInterface Class ::xowf::test_item::AssessmentInterface (public) Class ::xowf::test_item::AssessmentInterface->template::adp_parse_tags adp_parse_ad_conn_file adp_parse_ad_conn_file (private) adp_parse_ad_conn_file->template::adp_parse_tags template::adp_parse_tags_and_localize template::adp_parse_tags_and_localize (private) template::adp_parse_tags_and_localize->template::adp_parse_tags xowf::test_item::AssessmentInterface instproc export_links xowf::test_item::AssessmentInterface instproc export_links (protected) xowf::test_item::AssessmentInterface instproc export_links->template::adp_parse_tags xowf::test_item::AssessmentInterface instproc render_feedback_files xowf::test_item::AssessmentInterface instproc render_feedback_files (public) xowf::test_item::AssessmentInterface instproc render_feedback_files->template::adp_parse_tags

Testcases:
adp_parse_tags

template::adp_parse_tags_and_localize (private)

 template::adp_parse_tags_and_localize HTML

Helper proc to combine "adp_parse_tags" and "lang::util::localize" as used in the regsub operations for resolving template variables.

Parameters:
HTML (required)

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_compile template::adp_compile (public) template::adp_parse_tags_and_localize template::adp_parse_tags_and_localize template::adp_compile->template::adp_parse_tags_and_localize lang::util::localize lang::util::localize (public) template::adp_parse_tags_and_localize->lang::util::localize template::adp_parse_tags template::adp_parse_tags (public) template::adp_parse_tags_and_localize->template::adp_parse_tags

Testcases:
No testcase defined.

template::adp_prepare (private)

 template::adp_prepare

Executes the code to prepare the data sources for a template. The code is executed in the stack frame of the calling procedure (adp_parse) so that variables are accessible when the compiled template code is executed. If the preparation code executes the set_file command, the procedure will recurse and execute the code for the next template as well.

Returns:
boolean (0 or 1): whether the (ultimate) script was found.

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_parse template::adp_parse (public) template::adp_prepare template::adp_prepare template::adp_parse->template::adp_prepare template::frm_page_handler template::frm_page_handler (public) template::frm_page_handler->template::adp_prepare ad_script_abort ad_script_abort (public) template::adp_prepare->ad_script_abort template::adp_init template::adp_init (public) template::adp_prepare->template::adp_init

Testcases:
No testcase defined.

template::adp_puts (private)

 template::adp_puts text

Add text to the ADP currently being rendered. Maybe used within escaped Tcl code in the template to add to the output.

Parameters:
text (required)
A string containing text or markup.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

template::adp_quote_chunk (private)

 template::adp_quote_chunk chunk_var_name quoted_var_name

Quotes (precedes by backslash) all square brackets, curly braces, double quotes, backslashes, and dollar signs in a chunk of adp.

Parameters:
chunk_var_name (required)
The name of the variable to quote
quoted_var_name (required)
The name of the variable to put the quoted result in
Author:
Peter Marklund <peter@collaboraid.biz>
Created:
2002-10-16

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_compile_chunk template::adp_compile_chunk (public) template::adp_quote_chunk template::adp_quote_chunk template::adp_compile_chunk->template::adp_quote_chunk template::adp_tag_init template::adp_tag_init (private) template::adp_tag_init->template::adp_quote_chunk

Testcases:
No testcase defined.

template::adp_set_vars (private)

 template::adp_set_vars

Set variables passes from a container template, including onerow and multirow data sources. This code must be executed in the same stack frame as adp_parse, but is in a separate proc to improve code readability.

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) template::adp_level template::adp_level (public) template::adp_set_vars template::adp_set_vars template::adp_set_vars->_ template::adp_set_vars->template::adp_level

Testcases:
No testcase defined.

template::adp_tag_init (private)

 template::adp_tag_init [ tag_name ]

Called at the beginning of every tag handler to flush the ADP buffer of output accumulated from the last tag (or from the beginning of the file).

Parameters:
tag_name (optional)
The name of the tag. Used for debugging purposes only.

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_append_string template::adp_append_string (private) template::adp_quote_chunk template::adp_quote_chunk (private) template::adp_tag_init template::adp_tag_init template::adp_tag_init->template::adp_append_string template::adp_tag_init->template::adp_quote_chunk

Testcases:
No testcase defined.

template::adp_variable_regexp (public)

 template::adp_variable_regexp

The regexp pattern used to find adp variables in a piece of text, i.e. occurrences of @variable_name@. Captures the character preceding the first @ in \1 and the variable_name in \2.

Author:
Peter Marklund <peter@collaboraid.biz>
Created:
25 October 2002

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_variable_regexp template::adp_variable_regexp test_template_variable->template::adp_variable_regexp Class ::xowf::test_item::Question_manager Class ::xowf::test_item::Question_manager (public) Class ::xowf::test_item::Question_manager->template::adp_variable_regexp lang::util::convert_adp_variables_to_percentage_signs lang::util::convert_adp_variables_to_percentage_signs (private) lang::util::convert_adp_variables_to_percentage_signs->template::adp_variable_regexp lang::util::convert_percentage_signs_to_adp_variables lang::util::convert_percentage_signs_to_adp_variables (private) lang::util::convert_percentage_signs_to_adp_variables->template::adp_variable_regexp lang::util::replace_adp_text_with_message_tags lang::util::replace_adp_text_with_message_tags (public) lang::util::replace_adp_text_with_message_tags->template::adp_variable_regexp template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_variable_regexp

Testcases:
template_variable

template::adp_variable_regexp_literal (public)

 template::adp_variable_regexp_literal

adp_variable_regexp augmented by "literal"

Author:
Gustaf Neumann
Created:
December 2012

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_variable_regexp_literal template::adp_variable_regexp_literal test_template_variable->template::adp_variable_regexp_literal template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_variable_regexp_literal

Testcases:
template_variable

template::adp_variable_regexp_noi18n (public)

 template::adp_variable_regexp_noi18n

adp_variable_regexp augmented by "noi18n"

Author:
Gustaf Neumann
Created:
June 2015

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_variable_regexp_noi18n template::adp_variable_regexp_noi18n test_template_variable->template::adp_variable_regexp_noi18n template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_variable_regexp_noi18n

Testcases:
template_variable

template::adp_variable_regexp_noquote (public)

 template::adp_variable_regexp_noquote

adp_variable_regexp augmented by "noquote"

Author:
Dirk Gomez <openacs@dirkgomez.de>
Created:
12 February 2003

Partial Call Graph (max 5 caller/called nodes):
%3 test_template_variable template_variable (test acs-templating) template::adp_variable_regexp_noquote template::adp_variable_regexp_noquote test_template_variable->template::adp_variable_regexp_noquote lang::util::convert_adp_variables_to_percentage_signs lang::util::convert_adp_variables_to_percentage_signs (private) lang::util::convert_adp_variables_to_percentage_signs->template::adp_variable_regexp_noquote lang::util::convert_percentage_signs_to_adp_variables lang::util::convert_percentage_signs_to_adp_variables (private) lang::util::convert_percentage_signs_to_adp_variables->template::adp_variable_regexp_noquote lang::util::replace_adp_text_with_message_tags lang::util::replace_adp_text_with_message_tags (public) lang::util::replace_adp_text_with_message_tags->template::adp_variable_regexp_noquote template::adp_compile template::adp_compile (public) template::adp_compile->template::adp_variable_regexp_noquote

Testcases:
template_variable

template::current_tag (private)

 template::current_tag

Return the top level tag from the stack.

Returns:
the tag from the top of the tag stack.
Author:
Lee Denison <lee@runtime-collective.com>
Created:
2002-01-30

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl template::current_tag template::current_tag packages/acs-templating/tcl/tag-init.tcl->template::current_tag

Testcases:
No testcase defined.

template::enclosing_tag (private)

 template::enclosing_tag tag

Reach back into the tag stack for the last enclosing instance of a tag. Typically used where the usage of a tag depends on its context, such as the "group" tag within a "multiple" tag.

Parameters:
tag (required)
the type (e.g. multiple) of the enclosing tag to look for.
Returns:
the tag identifier for the enclosing tag
Author:
Lee Denison <lee@runtime-collective.com>
Created:
2002-01-30

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl template::enclosing_tag template::enclosing_tag packages/acs-templating/tcl/tag-init.tcl->template::enclosing_tag

Testcases:
No testcase defined.

template::expand_percentage_signs (public)

 template::expand_percentage_signs message

Expand variables marked with percentage signs in caller's scope. Some examples - if example and array(variable) has the values Erik and Oluf in the caller's scope - the following expansion will occur: Here is an %example% variable. -> Here is an Erik variable. Here is an %array.variable% for you -> Here is an Oluf for you

Parameters:
message (required)
Author:
Christian Hvid

Partial Call Graph (max 5 caller/called nodes):
%3 test_expand_percentage_signs expand_percentage_signs (test acs-templating) template::expand_percentage_signs template::expand_percentage_signs test_expand_percentage_signs->template::expand_percentage_signs lang::message::embedded_vars_regexp lang::message::embedded_vars_regexp (public) template::expand_percentage_signs->lang::message::embedded_vars_regexp template::adp_compile template::adp_compile (public) template::adp_compile->template::expand_percentage_signs

Testcases:
expand_percentage_signs

template::get_attribute (public)

 template::get_attribute tag params name [ default ]

Retrieves a named attribute value from the parameter set passed to a tag handler. If a default is not specified, assumes the attribute is required and throws an error.

Parameters:
tag (required)
The name of the tag.
params (required)
The ns_set passed to the tag handler.
name (required)
The name of the attribute.
default (optional, defaults to "ERROR")
A default value to return if the attribute is not specified in the template. A default value of "ERROR" will cause the proc to throw an error if the attribute wasn't supplied.
Returns:
The value of the attribute.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl template::get_attribute template::get_attribute packages/acs-templating/tcl/tag-init.tcl->template::get_attribute publish::process_tag publish::process_tag (private) publish::process_tag->template::get_attribute

Testcases:
No testcase defined.

template::set_file (public)

 template::set_file path

Set the path of the template to render. This is typically used to implement multiple "skins" on a common set of data sources. The initial code (which may be in a .tcl file not associated with a .adp file) sets up any number of data sources, and then calls set_file to specify the template to actually render. Any code associated with the specified template is executed in the same stack frame as the initial code, so that each "skin" may reference additional specific data or logic as necessary.

Parameters:
path (required)
The root (sans file extension) of the absolute path to the next template to parse.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_return_template ad_return_template (public) template::set_file template::set_file ad_return_template->template::set_file packages/xolirc/www/portlets/include.tcl packages/xolirc/ www/portlets/include.tcl packages/xolirc/www/portlets/include.tcl->template::set_file packages/xowiki/lib/portlets/include.tcl packages/xowiki/ lib/portlets/include.tcl packages/xowiki/lib/portlets/include.tcl->template::set_file packages/xowiki/www/admin/samples/ajax-chat.tcl packages/xowiki/ www/admin/samples/ajax-chat.tcl packages/xowiki/www/admin/samples/ajax-chat.tcl->template::set_file template::request::is_valid template::request::is_valid (public) template::request::is_valid->template::set_file template::adp_level template::adp_level (public) template::set_file->template::adp_level

Testcases:
No testcase defined.

template::tag_attribute (private)

 template::tag_attribute tag attribute

Return an attribute from a tag that has already been processed.

Parameters:
tag (required)
the tag identifier
attribute (required)
the attribute name
Returns:
the value of the tag's attribute
Author:
Lee Denison <lee@runtime-collective.com>
Created:
2002-01-30

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl template::tag_attribute template::tag_attribute packages/acs-templating/tcl/tag-init.tcl->template::tag_attribute

Testcases:
No testcase defined.
[ show source ]