The output directory can be set in two ways. An individual document can specify output-dir="directory" in the dbhtml PI, or the stylesheet can specify the %output-dir%. If both are specified, the PI value will be used.
Note: the output directory is ignored if use-output-dir is not #t. (This allows the author to test stylesheets and documents without accidentally overwriting existing documents.)