Filter
A simple substitution filter. Reference in the project source to a token in form @TOKEN-NAME@ will be substituted with the token value (where TOKEN-NAME is the value of the token attribute).
Attributes
| token | required | The string token that is to be replaced. |
| value | required | The substitution value. |
Example
The following example demonstrates the declaration of a series of properties and filters within the DPML module. Note that filter values may reference properties via symbolic references.
<module name="dpml" basedir=".">
<properties>
<property name="project.publisher.name" value="Digital Product Management Library"/>
<property name="project.specification.vendor" value="${project.publisher.name}"/>
<property name="project.implementation.vendor" value="${project.publisher.name}"/>
<property name="project.implementation.vendor-id" value="net.dpml"/>
<property name="project.publisher.url" value="http://www.dpml.net"/>
<property name="project.resource.host" value="http://repository.dpml.net"/>
<property name="project.api.host" value="http://api.dpml.net"/>
<property name="project.svn.host" value="svn://svn.berlios.de/dpml/trunk/main"/>
<property name="project.javadoc.linksource" value="true"/>
</properties>
...
<filters>
<filter token="PROJECT-VERSION" value="${project.version}"/>
<filter token="PUBLISHER-NAME" value="${project.publisher.name}"/>
<filter token="PUBLISHER-URL" value="${project.publisher.url}"/>
</filters>
</module>