Validation and profiling

If you use profiling, you will want to make sure that your documents are valid both before and after the profiling step. You will want them to be valid before profiling so that you can use a validating authoring tool to help you write the files. And the profiled versions should also be valid because the DocBook XSL stylesheets assume the document being processed is valid DocBook. You may get strange results if it is not valid. The profiling step could make a valid document invalid, and most XSLT processors do not take the time to validate the input XML.

Here are some of the areas to watch out for:

To ensure that your profiled documents are valid, you might want to apply the profiling-only stylesheet described in the section “Two-pass processing”. Perform just the first step to generate the profiled DocBook document, and then run a DTD validation check on that temporary document.