[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_adp_parse

Overview

Process an ADP file or string and return the result as a string

Syntax

ns_adp_parse [-file | -string] [-global | -local] adp ?arg1? ?arg2? ?...?

Description

This function processes the specified ADP file or string and returns the result as a string. If you need to process a second ADP from inside an ADP, it is usually better to use ns_adp_include, because that function resolves relative pathnames passed to it. Also note that ns_adp_parse will ignore any directives to turn on streaming.

If you use the -file syntax, the adp is the aboslute filename of the file containing the ADP to be parsed.

If you use the -string syntax, the adp is a string containing ADP syntax to be parsed. Note that when you call ns_adp_parse with the -string syntax from inside an ADP, the string cannot contain the <% ... %> syntax. The -string syntax is the default.

The -global syntax is obsolete and will cause an error.

If -local is specified, any Tcl commands in the ADP will be evaluated with Tcl_Eval. The -local syntax is the default.

You can pass optional arguments (arg1, arg2, etc.) to the ADP. The arguments can be accessed within the ADP using the ns_adp_argc, ns_adp_argv, and ns_adp_bind_args functions.

If this call is a nested ADP evaluation (where one ADP calls another), an error will be returned if the maximum number of nested ADP evaluations, 256, has been exceeded.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.