template::adp_parse_tags (public)
template::adp_parse_tags HTML
Defined in packages/acs-templating/tcl/parse-procs.tcl
Parse the tags of the provided HTML text. This function is similar to
template::adp_compile -string $HTMLbut 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):
- Testcases:
- adp_parse_tags
Source code: # #ns_log notice "adp_parse_tags BEGIN [info exists ::template::parse_list]: $HTML" if {[string is space $HTML]} { return $HTML } set old_parse_list [expr {[info exists ::template::parse_list] ? $::template::parse_list : ""}] set ::template::parse_list "" # # The following exception handler is just for safety to achieve a # high-level of backward compatibility. In case # "adp_compile_chunk" and or the evaluation of the resulting code # fails, fall back to the original behavior without ADP tag # substitution. # try { template::adp_compile_chunk $HTML lappend ::template::parse_list {set __adp_output} #ns_log notice "adp_parse_tags parse list '[join $::template::parse_list \n]'" set HTML [eval [join $::template::parse_list \n]] } on error {errorMsg} { ad_log warning "adp_parse_tags failed on parsing:\n'$HTML'" } set ::template::parse_list $old_parse_list #ns_log notice "adp_parse_tags END: $HTML" return $HTMLXQL Not present: Generic, PostgreSQL, Oracle