Take into account the outdir document attribute if specified