public final void startElement( String namespaceURI, String localName, String qName, Attributes atts ) {// within the island of XSD, foreign namespaces are prohibited. final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts)); // we have to copy Attributes, otherwise it will be mutated by SAX parser State nextState = createChildState(tag); if(nextState!=null) { reader.pushState(nextState,this,tag); return; } // unacceptable element reader.reportError(GrammarReader.ERR_MALPLACED_ELEMENT, tag.qName ); // try to recover from error by just ignoring it. // element of a foreign namespace. skip subtree reader.pushState(new IgnoreState(),this,tag); } }
public final void startElement( String namespaceURI, String localName, String qName, Attributes atts ) {// within the island of XSD, foreign namespaces are prohibited. final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts),(IDContextProvider2)null); // we have to copy Attributes, otherwise it will be mutated by SAX parser State nextState = createChildState(tag); if(nextState!=null) { reader.pushState(nextState,this,tag); return; } // unacceptable element reader.reportError(GrammarReader.ERR_MALPLACED_ELEMENT, tag.qName ); // try to recover from error by just ignoring it. // element of a foreign namespace. skip subtree reader.pushState(new IgnoreState(),this,tag); } }
public final void startElement( String namespaceURI, String localName, String qName, Attributes atts ) {// within the island of XSD, foreign namespaces are prohibited. final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts)); // we have to copy Attributes, otherwise it will be mutated by SAX parser State nextState = createChildState(tag); if(nextState!=null) { reader.pushState(nextState,this,tag); return; } // unacceptable element reader.reportError(GrammarReader.ERR_MALPLACED_ELEMENT, tag.qName ); // try to recover from error by just ignoring it. // element of a foreign namespace. skip subtree reader.pushState(new IgnoreState(),this,tag); } }
public final void startElement( String namespaceURI, String localName, String qName, Attributes atts ) {// within the island of XSD, foreign namespaces are prohibited. final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts)); // we have to copy Attributes, otherwise it will be mutated by SAX parser State nextState = createChildState(tag); if(nextState!=null) { reader.pushState(nextState,this,tag); return; } // unacceptable element reader.reportError(GrammarReader.ERR_MALPLACED_ELEMENT, tag.qName ); // try to recover from error by just ignoring it. // element of a foreign namespace. skip subtree reader.pushState(new IgnoreState(),this,tag); } }
public void endAttributes() throws SAXException { if(!acceptor.onEndAttributes( null, null )) { // some required attributes are missing. // report a validation error // Note that we don't know which property of this object // causes this error. StringRef ref = new StringRef(); StartTagInfo sti = new StartTagInfo( currentElementUri,currentElementLocalName,currentElementLocalName, emptyAttributes,this); acceptor.onEndAttributes( sti, ref ); context.reportEvent(target,ref.str); } }
public void endAttributes() throws SAXException { if(!acceptor.onEndAttributes( null, null )) { // some required attributes are missing. // report a validation error // Note that we don't know which property of this object // causes this error. StringRef ref = new StringRef(); StartTagInfo sti = new StartTagInfo( currentElementUri,currentElementLocalName,currentElementLocalName, emptyAttributes,this); acceptor.onEndAttributes( sti, ref ); context.reportEvent(target,ref.str); } }
public void endAttributes() throws SAXException { if(!acceptor.onEndAttributes( null, null )) { // some required attributes are missing. // report a validation error // Note that we don't know which property of this object // causes this error. StringRef ref = new StringRef(); StartTagInfo sti = new StartTagInfo( currentElementUri,currentElementLocalName,currentElementLocalName, emptyAttributes,this); acceptor.onEndAttributes( sti, ref ); context.reportEvent(target,ref.str); } }
public void endAttributes() throws SAXException { if(!acceptor.onEndAttributes( null, null )) { // some required attributes are missing. // report a validation error // Note that we don't know which property of this object // causes this error. StringRef ref = new StringRef(); StartTagInfo sti = new StartTagInfo( currentElementUri,currentElementLocalName,currentElementLocalName, emptyAttributes,this); acceptor.onEndAttributes( sti, ref ); context.reportEvent(target,ref.str); } }
public void endAttributes() throws SAXException { // TODO: supply StartTagInfo by remembering all reported attributes if(!acceptor.onEndAttributes( null, null )) { // some required attributes are missing. // report a validation error // Note that we don't know which property of this object // causes this error. StringRef ref = new StringRef(); StartTagInfo sti = new StartTagInfo( currentElementUri,currentElementLocalName,currentElementLocalName, emptyAttributes,this); acceptor.onEndAttributes( sti, ref ); context.reportEvent(target,ref.str); } }
public void startElement( String namespaceURI, String localName, String qName, Attributes atts ) { final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts));
public void startElement( String namespaceURI, String localName, String qName, Attributes atts ) { final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts),(IDContextProvider2)null);
public void startElement( String namespaceURI, String localName, String qName, Attributes atts ) { final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts));
public void startElement( String namespaceURI, String localName, String qName, Attributes atts ) { final StartTagInfo tag = new StartTagInfo( namespaceURI,localName,qName,new AttributesImpl(atts));
reader.pushState( new IgnoreState(), this, new StartTagInfo(namespace,localName,qName,atts,reader) ); return;
reader.pushState( new IgnoreState(), this, new StartTagInfo(namespace,localName,qName,atts,reader) ); return;
public void startElement( String uri, String local ) throws SAXException { writePendingText(); context.getNamespaceContext().startElement(); stack.push(acceptor); StartTagInfo sti = new StartTagInfo(uri,local,local,emptyAttributes,this); // we pass in an empty attributes, as there is just no way for us to // properly re-construct attributes. Fortunately, I know MSV is not using // attribute values, so this would work, but nevertheless this code is // ugly. This is one of the problems of the "middle" approach. Acceptor child = acceptor.createChildAcceptor( sti, null ); if( child==null ) { // this element is invalid. probably, so this object is invalid // report an error StringRef ref = new StringRef(); child = acceptor.createChildAcceptor( sti, ref ); context.reportEvent(target,ref.str); } this.currentElementUri = uri; this.currentElementLocalName = local; acceptor = child; }
public void startElement( String uri, String local ) throws SAXException { writePendingText(); context.getNamespaceContext().startElement(); stack.push(acceptor); StartTagInfo sti = new StartTagInfo(uri,local,local,emptyAttributes,this); // we pass in an empty attributes, as there is just no way for us to // properly re-construct attributes. Fortunately, I know MSV is not using // attribute values, so this would work, but nevertheless this code is // ugly. This is one of the problems of the "middle" approach. Acceptor child = acceptor.createChildAcceptor( sti, null ); if( child==null ) { // this element is invalid. probably, so this object is invalid // report an error StringRef ref = new StringRef(); child = acceptor.createChildAcceptor( sti, ref ); context.reportEvent(target,ref.str); } this.currentElementUri = uri; this.currentElementLocalName = local; acceptor = child; }
public void startElement( String uri, String local ) throws SAXException { writePendingText(); context.getNamespaceContext().startElement(); stack.push(acceptor); StartTagInfo sti = new StartTagInfo(uri,local,local,emptyAttributes,this); // we pass in an empty attributes, as there is just no way for us to // properly re-construct attributes. Fortunately, I know MSV is not using // attribute values, so this would work, but nevertheless this code is // ugly. This is one of the problems of the "middle" approach. Acceptor child = acceptor.createChildAcceptor( sti, null ); if( child==null ) { // this element is invalid. probably, so this object is invalid // report an error StringRef ref = new StringRef(); child = acceptor.createChildAcceptor( sti, ref ); context.reportEvent(target,ref.str); } this.currentElementUri = uri; this.currentElementLocalName = local; acceptor = child; }
public void startElement( String uri, String local ) throws SAXException { writePendingText(); context.getNamespaceContext().startElement(); stack.push(acceptor); StartTagInfo sti = new StartTagInfo(uri,local,local,emptyAttributes,this); // we pass in an empty attributes, as there is just no way for us to // properly re-construct attributes. Fortunately, I know MSV is not using // attribute values, so this would work, but nevertheless this code is // ugly. This is one of the problems of the "middle" approach. Acceptor child = acceptor.createChildAcceptor( sti, null ); if( child==null ) { // this element is invalid. probably, so this object is invalid // report an error StringRef ref = new StringRef(); child = acceptor.createChildAcceptor( sti, ref ); context.reportEvent(target,ref.str); } this.currentElementUri = uri; this.currentElementLocalName = local; acceptor = child; }
public void startElement( String uri, String local ) throws SAXException { writePendingText(); context.getNamespaceContext().startElement(); stack.push(acceptor); StartTagInfo sti = new StartTagInfo(uri,local,local,emptyAttributes,this); // we pass in an empty attributes, as there is just no way for us to // properly re-construct attributes. Fortunately, I know MSV is not using // attribute values, so this would work, but nevertheless this code is // ugly. This is one of the problems of the "middle" approach. Acceptor child = acceptor.createChildAcceptor( sti, null ); if( child==null ) { // this element is invalid. probably, so this object is invalid // report an error StringRef ref = new StringRef(); child = acceptor.createChildAcceptor( sti, ref ); context.reportEvent(target,ref.str); } this.currentElementUri = uri; this.currentElementLocalName = local; acceptor = child; }