# Custom Schema

Forrest comes with a set of schemas for common documents, however, if you have existing documents that use a different schema you will want to tell Forrest how to work with them. The best way of doing this is to build a plugin so that you can easily reuse the functionality on different projects. Plugins also allow you to share this new functionality with other users, and to benefit from their contributions to your work.

If you don't want to build a plugin you can make Forrest process them within your project sitemap (but this won't really save you any work since the process is almost the same). This sample site has a demonstration of using a custom DTD. If you request <a href="custom.html"> you can see the results.

Look at the project `sitemap.xmap` to see how it is done. View the xml source at "src/documentation/content/samples/custom.xml" and refer to the DTD and its configuration at "src/documentation/resources/schema/". See the project sitemap at "src/documentation/sitemap.xmap" for how the custom doctype is processed and the stylesheet is applied.

See the full story about handling custom document types.

Adding custom schemas with a plugin has the added benefit of being able to add the schema definition to the catalog file rather than having to reference it directly from within the XML document.