Class ValidatingUnmarshaller

  • All Implemented Interfaces:
    SAXUnmarshallerHandler, javax.xml.bind.UnmarshallerHandler, ContentHandler

    public class ValidatingUnmarshaller
    extends org.iso_relax.verifier.impl.ForkContentHandler
    implements SAXUnmarshallerHandler
    Filter implementation of SAXUnmarshallerHandler.

    This component internally uses a VerifierFilter to validate SAX events that goes through this component. Discovered error information is just passed down to the next component.

    This will enable the implementation to validate all sources of SAX events in the RI - XMLReader, DOMScanner SAX events will go the VerifierFilter and then to the SAXUnmarshaller...

    • Method Detail

      • create

        public static ValidatingUnmarshaller create​(com.sun.msv.grammar.Grammar grammar,
                                                    SAXUnmarshallerHandler _core,
                                                    com.sun.xml.bind.validator.Locator locator)
        Creates a new instance of ValidatingUnmarshaller.
      • handleEvent

        public void handleEvent​(javax.xml.bind.ValidationEvent event,
                                boolean canRecover)
                         throws SAXException
        Description copied from interface: SAXUnmarshallerHandler
        Reports an error to the user, and asks if s/he wants to recover. If the canRecover flag is false, regardless of the client instruction, an exception will be thrown. Only if the flag is true and the user wants to recover from an error, the method returns normally. The thrown exception will be catched by the unmarshaller.
        Specified by:
        handleEvent in interface SAXUnmarshallerHandler
        Throws:
        SAXException