5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk// Any modifications to this file will be lost upon recompilation of the source schema.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk// Generated on: 2012.06.11 at 10:34:07 AM PDT
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkpackage com.sun.identity.saml2.jaxb.assertion.impl.runtime;
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkimport org.iso_relax.verifier.impl.ForkContentHandler;
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenkimport com.sun.msv.verifier.regexp.REDocumentDeclaration;
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Filter implementation of SAXUnmarshallerHandler.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * This component internally uses a VerifierFilter to validate
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * SAX events that goes through this component.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Discovered error information is just passed down to the next component.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * This will enable the implementation to validate all sources of SAX events
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * in the RI - XMLReader, DOMScanner
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * SAX events will go the VerifierFilter and then to the SAXUnmarshaller...
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkpublic class ValidatingUnmarshaller extends ForkContentHandler
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Creates a new instance of ValidatingUnmarshaller.
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk public static ValidatingUnmarshaller create( Grammar grammar,
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk // create a VerifierFilter and configure it
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk // so that error messages will be sent to the core,
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk private ValidatingUnmarshaller( VerifierFilter filter,
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk // delegate to the next component
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk public Object getResult() throws JAXBException, IllegalStateException {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk public void handleEvent(ValidationEvent event, boolean canRecover ) throws SAXException {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk // SAXUnmarshallerHandler already checks for RuntimeExceptions, so
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk // there is no need to wrap this call in a try/catch
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk private final AttributesImpl xsiLessAtts = new AttributesImpl();
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk public void startElement( String nsUri, String local, String qname, Attributes atts ) throws SAXException {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk // create an attributes set for MSV that doesn't contains xsi:schemaLocation
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk if(aUri.equals("http://www.w3.org/2001/XMLSchema-instance")
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk /*aLocal.equals("type")*/))
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk // we do handle xsi:nil.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk atts.getQName(i), atts.getType(i), atts.getValue(i) );