Author: mukulg Date: Tue Jul 3 21:07:23 2012 New Revision: 1356945 URL: http://svn.apache.org/viewvc?rev=1356945&view=rev Log: schema 1.1 fix: committing a fix for issue discussed here, http://markmail.org/message/oeq67cywvut5gqjx (in certain cases, errors generated during XML Schema validation were not propagated up the stack).
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1356945&r1=1356944&r2=1356945&view=diff ============================================================================== --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Tue Jul 3 21:07:23 2012 @@ -53,15 +53,15 @@ import org.apache.xerces.impl.xs.models. import org.apache.xerces.impl.xs.models.CMNodeFactory; import org.apache.xerces.impl.xs.models.XSCMValidator; import org.apache.xerces.impl.xs.util.ObjectListImpl; -import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.impl.xs.util.XS11TypeHelper; +import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.util.AugmentationsImpl; import org.apache.xerces.util.IntStack; import org.apache.xerces.util.SymbolTable; +import org.apache.xerces.util.URI.MalformedURIException; import org.apache.xerces.util.XMLAttributesImpl; import org.apache.xerces.util.XMLChar; import org.apache.xerces.util.XMLSymbols; -import org.apache.xerces.util.URI.MalformedURIException; import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.NamespaceContext; import org.apache.xerces.xni.QName; @@ -80,6 +80,7 @@ import org.apache.xerces.xni.parser.XMLD import org.apache.xerces.xni.parser.XMLDocumentSource; import org.apache.xerces.xni.parser.XMLEntityResolver; import org.apache.xerces.xni.parser.XMLInputSource; +import org.apache.xerces.xni.parser.XMLParseException; import org.apache.xerces.xs.AttributePSVI; import org.apache.xerces.xs.ElementPSVI; import org.apache.xerces.xs.ShortList; @@ -2620,7 +2621,7 @@ public class XMLSchemaValidator fAssertionValidator.handleStartElement(element, attributes); } catch(Exception ex) { - throw new XNIException(ex.getMessage(), ex); + throw new XMLParseException(fLocator, ex.getMessage()); } } // assertionValidatorStartElementDelegate @@ -2763,7 +2764,7 @@ public class XMLSchemaValidator assertionValidatorEndElementDelegate(element); } catch(Exception ex) { - // NO OP + throw new XMLParseException(fLocator, ex.getMessage()); } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org