public void ignorableWhitespace( String text ) throws IOException { if ( startTagIncomplete || setPrefixCalled || seenBracket ) closeStartTag(); if ( doIndent && seenTag ) seenTag = false; if ( text.length() == 0 ) { throw new IllegalArgumentException( "empty string is not allowed for ignorable whitespace" + getLocation() ); } out.write( text ); // no escape? }
protected void closeStartTag() throws IOException { if ( finished ) { throw new IllegalArgumentException( "trying to write past already finished output" + getLocation() ); } if ( seenBracket ) { seenBracket = seenBracketBracket = false; } if ( startTagIncomplete || setPrefixCalled ) { if ( setPrefixCalled ) { throw new IllegalArgumentException( "startTag() must be called immediately after setPrefix()" + getLocation() ); } if ( !startTagIncomplete ) { throw new IllegalArgumentException( "trying to close start tag that is not opened" + getLocation() ); } // write all namespace declarations! writeNamespaceDeclarations(); out.write( '>' ); elNamespaceCount[depth] = namespaceEnd; startTagIncomplete = false; } }
throw new IllegalArgumentException( "namespace must be not null" + getLocation() ); throw new IllegalArgumentException( "default namespace cannot have prefix" + getLocation() );
+ " is not allowed in output" + getLocation() );
+ " is not allowed in output" + getLocation() );
throw new IllegalArgumentException( "prefix must be not null" + getLocation() ); throw new IllegalStateException( "duplicated prefix " + printable( prefix ) + getLocation() ); throw new IllegalArgumentException( "namespace must be not null" + getLocation() );
throw new IllegalArgumentException( "startTag() must be called before attribute()" + getLocation() );
+ printable( namespace ) + getLocation() ); throw new IllegalArgumentException( "end tag name can not be null" + getLocation() ); + printable( name ) + getLocation() );
+ "as default namespace is currently bound to '" + uri + "'" + getLocation() );
protected void closeStartTag() throws IOException { if(finished) { throw new IllegalArgumentException("trying to write past already finished output"+getLocation()); } if(seenBracket) { seenBracket = seenBracketBracket = false; } if( startTagIncomplete || setPrefixCalled ) { if(setPrefixCalled) { throw new IllegalArgumentException( "startTag() must be called immediately after setPrefix()"+getLocation()); } if(!startTagIncomplete) { throw new IllegalArgumentException("trying to close start tag that is not opened"+getLocation()); } // write all namespace declarations! writeNamespaceDeclarations(); out.write('>'); elNamespaceCount[ depth ] = namespaceEnd; startTagIncomplete = false; } }
public void ignorableWhitespace (String text) throws IOException { if(startTagIncomplete || setPrefixCalled || seenBracket) closeStartTag(); if(doIndent && seenTag) seenTag = false; if(text.length() == 0) { throw new IllegalArgumentException( "empty string is not allowed for ignorable whitespace"+getLocation()); } out.write(text); //no escape? }
throw new IllegalArgumentException("namespace must be not null"+getLocation()); } else if(namespace.length() == 0) { throw new IllegalArgumentException("default namespace cannot have prefix"+getLocation());
} else { throw new IllegalStateException( "character "+Integer.toString(ch)+" is not allowed in output"+getLocation());
"character "+Integer.toString(ch)+" is not allowed in output"+getLocation());
"character "+Integer.toString(ch)+" is not allowed in output"+getLocation());
checkInterning(prefix); } else if(prefix == null) { throw new IllegalArgumentException("prefix must be not null"+getLocation()); throw new IllegalStateException("duplicated prefix "+printable(prefix)+getLocation()); checkInterning(namespace); } else if(namespace == null) { throw new IllegalArgumentException("namespace must be not null"+getLocation());
throw new IllegalArgumentException("startTag() must be called before attribute()"+getLocation());
+" and not "+printable(namespace)+getLocation()); throw new IllegalArgumentException("end tag name can not be null"+getLocation()); "expected element name "+printable(elName[ depth ])+" and not "+printable(name)+getLocation());
throw new IllegalStateException( "start tag can not be written in empty default namespace "+ "as default namespace is currently bound to '"+uri+"'"+getLocation());