<filterchain>

[This is preliminary documentation and subject to change.]

Represent a chain of NAnt filters that can be applied to a Task.

A FilterChain represents a collection of one or more filters that can be appled to a Task such as the <copy> task. In the case of the <copy> task, the contents of the copied files are filtered through each filter specified in the filter chain. Filtering occurs in the order the filters are specified with filtered output of one filter feeding into another.

:--------:--->:----------:--->:----------: ... :----------:--->:--------:

:.Source.:--->:.Filter 1.:--->:.Filter 2.: ... :.Filter n.:--->:.target.:

:--------:--->:----------:--->:----------: ... :----------:--->:--------:

A list of all filters that come with NAnt is available here.

The following tasks support filtering with a FilterChain:

Parameters

Attribute Type Description Required
encoding Encoding Deprecated. The encoding to assume when filter-copying files. The default is system's current ANSI code page. False
id string The ID used to be referenced later. False
refid string The ID to use as the reference. False

Nested Elements:

<filter>

The filters to apply.

Allows a file's content to be modified while performing an operation.

Parameters

AttributeTypeDescriptionRequired
ifbool If true then the filter will be used; otherwise, skipped. The default is true. False
unlessbool Opposite of if. If false then the filter will be executed; otherwise, skipped. The default is false. False

</filter>

Examples

Requirements

Assembly: NAnt.Core (0.86.2898.0)