* supply an {@link net.sf.saxon.AugmentedSource AugmentedSource} object and set appropriate options on the object.</p>
* @return the DocumentInfo representing the root node of the resulting document object.
*/
public DocumentInfo buildDocument(Source source) throws XPathException {
Stripper stripper = null;
if (config.isStripsAllWhiteSpace()) {
stripper = AllElementStripper.getInstance();
stripper.setStripAll();
}
try {
NodeInfo contextNode = Builder.build(source, stripper, config);
return contextNode.getDocumentRoot();
} catch (XPathException err) {