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

ADP Parsers

An ADP parser implements a specific syntax for ADPs. Two ADP parsers are pre-defined for AOLserver:

You can register additional ADP parsers using the Ns_AdpRegisterParser C API function.

Configuration

To configure ADP parsers, set parameters in two configuration file sections as follows:

  1. Map parsers to file extensions in the ns/server/server-name/adp/parsers configuration file section. For example:

        ns_section "ns/server/server1/adp/parsers"
        ns_param "adp" ".adp"
        ns_param "fancy" ".fadp"
    

    The above configuration specifies that ADPs with the .adp extension will be parsed using the "adp" parser, and ADPs with the .fadp extension will be parsed using the "fancy" parser.

  2. Define a default parser in the ns/server/server-name/adp section. The default parser will be used for any ADPs with file extensions not associated with a parser. For example:

        ns_section "ns/server/server1/adp"
        ns_param "map" "/*.adp"
        ns_param "map" "/*.inc"
        ns_param "map" "/*.fadp"
        ns_param "DefaultParser" "adp"
        ns_section "ns/server/server1/adp/parsers"
        ns_param "adp" ".adp"
        ns_param "fancy" ".fadp"
    

    ADPs with the .adp extension will use the "adp" parser, and ADPs with the .fadp extension will use the "fancy" extension, as described above. The default ADP parser will be the "adp" parser. Since ADPs with the .inc extension are also allowed, the "adp" parser will be used for those ADPs, because no parser is associated with the .inc extension.

For more information on configuring ADPs, see the ADP configuration file sections starting on page page 56 of the AOLserver Administrator's Guide.

Top of Page

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