Index: runtime/src/com/sun/xml/bind/api/impl/NameConverter.java =================================================================== --- runtime/src/com/sun/xml/bind/api/impl/NameConverter.java (revision 3866) +++ runtime/src/com/sun/xml/bind/api/impl/NameConverter.java (working copy) @@ -147,9 +147,9 @@ } // issue 709; s/(.*)#(.*)/\1/ - idx = nsUri.indexOf("#"); - if(idx >= 0) - nsUri = nsUri.substring(0, idx); +// idx = nsUri.indexOf("#"); +// if(idx >= 0) +// nsUri = nsUri.substring(0, idx); // tokenize string ArrayList tokens = tokenize( nsUri, "/: " ); @@ -208,10 +208,17 @@ StringBuffer newToken = new StringBuffer(); for( int i = 0; i < token.length(); i++ ) { char c = token.charAt( i ); +//@ First character , if not a valid start as well as a valid Part...is not addressed as described in SPEC if( i ==0 && !Character.isJavaIdentifierStart( c ) ) { // prefix an '_' if the first char is illegal + if( !Character.isJavaIdentifierPart( c ) ) + {//Not a valid part as well, so replace 'c' with a '_' (as per SPEC - also addresses 709) + newToken.append('_'); + }else + { newToken.append('_').append(c); +} } else if( !Character.isJavaIdentifierPart( c ) ) { // replace the char with an '_' if it is illegal newToken.append( '_' );