# HG changeset patch # User joehw # Date 1594569249 -3600 # Node ID 7bd194c33dfa8c19db213001f64b1e70ddf340b9 # Parent c75d23b3a8ff86758cfb6addf7a7e7c02ccd2db7 8242136: Better XML namespace handling Reviewed-by: lancea, dfuchs, skoivu, rhalade, kravikumar, mbalao, andrew diff -r c75d23b3a8ff -r 7bd194c33dfa src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java --- a/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java Sat Jul 11 20:36:43 2020 +0100 +++ b/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java Sun Jul 12 16:54:09 2020 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -106,6 +106,7 @@ * @author Andy Clark IBM * @author Neeraj Bajaj, Sun Microsystems, inc. * @version $Id: XMLSchemaValidator.java,v 1.16 2010-11-01 04:39:55 joehw Exp $ + * @LastModified: Apr 2020 */ public class XMLSchemaValidator implements XMLComponent, XMLDocumentFilter, FieldActivator, RevalidationHandler { @@ -1727,7 +1728,7 @@ // root element if (fElementDepth == -1 && fValidationManager.isGrammarFound()) { - if (fSchemaType == null) { + if (fSchemaType == null && !fUseGrammarPoolOnly) { // schemaType is not specified // if a DTD grammar is found, we do the same thing as Dynamic: // if a schema grammar is found, validation is performed;