Association of Shareware Professionals
The World's #1 Trade Organization for Independent Software Developers and Vendors
PAD Overview -> Specification Details -> PAD Extensions Specification

PAD Extensions

For situations, where the company and product information in a PAD file is not sufficient, the PAD concept introduces a process to extend the default dataset by custom fields.

PAD Extensions support is part of the PAD Specification. A PAD Extension is a set of additional data fields that will be added to PAD files within a separate XML node. A PAD Extension is defined within a single HTML file including a form representation of the extension. Anyone may define a PAD Extension, but registration with the ASP is required to avoid naming conflicts. If you plan to create a PAD Extension, see below for the Specification for PAD Extension Creation.

PAD generation tools need to support PAD Extensions by implementing plug-in capabilities to display an input form for each extension, validate the input, and add the data to the resulting PAD file. If you plan to implement PAD Extension support within your PAD generation tool, see below for the Specification for PAD Extension Integration into PAD Generation Tools.

The following specification is very generic, see below for some Examples.

For a list of PAD Extensions see the PAD Extensions Directory.

Specification for PAD Extension Creation

A PAD Extension is defined within the HTML document format (Note: Although HTML is used, PAD Extensions are not subject to be displayed in web browsers). The following rules have to be respected when creating a PAD Extension:

Specification for PAD Extension Integration into PAD Generation Tools

Examples

The extension identifier of this sample extension is "SampleExtension".

<HTML>
<HEAD>
<TITLE>SampleExtension</TITLE>
</HEAD>
<BODY>
<FORM>


<H2>Sample PAD Extension</H2>


<INPUT TYPE="hidden" NAME="SampleExtension_FORM" VALUE="Y">
<INPUT TYPE="hidden" NAME="SampleExtension_DESCRIPTION" VALUE="Sample PAD Extension">
<INPUT TYPE="hidden" NAME="SampleExtension_VERSION" VALUE="1.0">
<INPUT TYPE="hidden" NAME="SampleExtension_URL" VALUE="http://www.asp-shareware.org/pad/extensions/SampleExtension.htm">
<INPUT TYPE="hidden" NAME="SampleExtension_SCOPE" VALUE="Program">

<!-- In the first example, we define a checkbox for a membership. -->
<!-- The allowed values are Y and N, case-insensitive. -->
<INPUT TYPE="checkbox" NAME="SampleExtension_Member" VALUE="Y" CHECKED>
<INPUT TYPE="hidden" NAME="SampleExtension_Member_REGEX" VALUE="^[yYnN]\Z">
<INPUT TYPE="hidden" NAME="SampleExtension_Member_REGEX_DOCUMENTATION" VALUE="Y, y, N, or n">
Are you a member of the SampleExtension network?<BR>

<!-- In the first example, we define a text box for a member code. -->
<!-- The allowed input is a number up to 6 digits. -->
If yes, enter your member code:
<INPUT TYPE="edit" NAME="SampleExtension_Member_Code" VALUE="">
<INPUT TYPE="hidden" NAME="SampleExtension_Member_Code_REGEX" VALUE="^[0-9]{0,6}\Z">
<INPUT TYPE="hidden" NAME="SampleExtension_Member_Code_REGEX_DOCUMENTATION" VALUE="Numerical 0-6 digits">

<P>
PAD Extension Author:
Association of Shareware Professionals,
<A HREF="http://www.asp-shareware.org">http://www.asp-shareware.org</A>

</FORM>
</BODY>
</HTML>

In a PAD generation tool, the sample extension will look like this:

Sample PAD Extension

Are you a member of the SampleExtension network?
If yes, enter your member code:

PAD Extension Author: Association of Shareware Professionals, http://www.asp-shareware.org

It will generate the following output within the PAD file:

<?xml version="1.0" encoding="UTF-8"?>
<XML_DIZ_INFO>
    <MASTER_PAD_VERSION_INFO>
[...]
    </MASTER_PAD_VERSION_INFO>
    <Company_Info>
[...]
    </Company_Info>
    <Program_Info>
[...]
    </Program_Info>

    <SampleExtension>
        <SampleExtension_FORM>Y</SampleExtension_FORM>
        <SampleExtension_DESCRIPTION>Sample PAD Extension</SampleExtension_DESCRIPTION>
        <SampleExtension_VERSION>1.0</SampleExtension_VERSION>
        <SampleExtension_URL>http://www.asp-shareware.org/pad/extensions/SampleExtension.htm</SampleExtension_URL>
        <SampleExtension_SCOPE>Program</SampleExtension_SCOPE>
        <SampleExtension_ASP_CD>Y</SampleExtension_ASP_CD>
        <SampleExtension_ASP_Code>[users entry]</SampleExtension_ASP_Code>
    </SampleExtension>
</XML_DIZ_INFO>