Configuration config = pipe.getConfiguration();
int schemaValidation = options.getSchemaValidationMode();
if ((schemaValidation & Validation.VALIDATION_MODE_MASK) != Validation.PRESERVE) {
// Add a document validator to the pipeline
int stripSpace = options.getStripSpace();
SchemaType topLevelType = options.getTopLevelType();
StructuredQName topLevelElement = options.getTopLevelElement();
int topLevelElementCode = -1;
if (topLevelElement != null) {
topLevelElementCode = config.getNamePool().allocate(
topLevelElement.getPrefix(), topLevelElement.getNamespaceURI(), topLevelElement.getLocalName());