Merge Point is a specific feature of xdoclet that gives the user "entry points" in Xdoclet. The user can add customised feature easily.
There are mainly two different parts that will show easily what you can benefit from using merge points.
Having to hardcode deployment descriptor specifics (ejb-jar.xml and vendor specific ones) in a source file simplify the deployment work but have the limitation that the programmer must also take the deployer role.
Let's take an example. You have, in your ejb-jar.xml, an env-entry element to a JDBC URL that you use inside a session bean (test.ejb.SessionBean.java) to access a database. You have created a tag @ejb:env-entry name="jdbcUrl" type="String" value="jdbc:hsqldb:hsql://thishost:1476". And use the value returned by a JNDI lookup to get your SQL connection.
The problem is that you will need to change your code when the url change. Several merge point exists in ejb-body.j. This file is the template for ejb-jar.xml, you can see the merge point we need : <XDtMerge:merge file="ejb-env-entries-{0}.xml">. Every lines between this tag and its closing tag will be replaced into the generated ejb-jar.xml file by the content of ejb-env-entries-SessionBean.xml, found under the directory given by the addition of the mergedir attribute you specify for the task or the subtask and a directory structure given by the package of the class. For example c:\mergedir\test\ejb\. Here is the content:
<env-entry>
<env-entry-name>jdbcUrl
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>jdbc:hsqldb:hsql://thishost:1476</env-entry-value>
</env-entry>
You can now change this file independantly of the source file.
Entry points exist in template files used to generate the Classes. For example in entitycmp.j, template for Entity Bean classes, you have <XDtMerge:merge file="entitycmp-custom.j"></XDtMerge:merge>. If you program something in this file (that will be searched in the mergedir of the task or subtask) the generated content will be included in the generated file.
Take example on existing .j files to learn the template language.
The combination of hardcoded part and parts written in the template language, you will find this feature very useful.
Look into the .j files directly to find all defined merge points.