You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by sa...@ca.ibm.com on 2001/11/05 16:39:08 UTC

Re: patch for BUG 2783

Hi Rahul. In the case rawName.equals("xmlns"), rawName.charAt(5) results in
an ArrayOutOfBound exception. I'll commit a change similar to what's
attached in the bug report:

<                 indexColon = rawName.indexOf( ':' );
<
<                 //is there a prefix
<                 if ( indexColon != -1 && ( indexColon + 1 ) <
rawName.length() )
<                     prefix = rawName.substring( indexColon + 1 );
<                 else
<                     prefix = "";
<
<                 startPrefixMapping( prefix, attrs.getValue( i ) );
<                 //Remove it
<                 attrsOnly.removeAttribute( i );
---
>                 if (rawName.length() == 5) {
>                     startPrefixMapping( "", attrs.getValue( i ) );
>                     attrsOnly.removeAttribute( i );
>                 } else if (rawName.charAt(5) == ':') {
>                     startPrefixMapping(rawName.substring(6),
attrs.getValue(i));
>                     attrsOnly.removeAttribute( i );
>                 }


Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com



                                                                                                                
                    Rahul Srivastava                                                                            
                    <Rahul.Srivastav       To:     xerces-j-dev@xml.apache.org                                  
                    a@Sun.COM>             cc:                                                                  
                                           Subject:     patch for BUG 2783                                      
                    11/05/2001 03:08                                                                            
                    PM                                                                                          
                    Please respond                                                                              
                    to xerces-j-dev                                                                             
                                                                                                                
                                                                                                                




Hi,

Please find attached patch for class XMLSerializer.
Ref: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2783

Any attribute starting with xmlns, does not necessarily mean it is defining
a
namespace.

Cheers,
Rahul.

Sun Microsystems, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

#### PApatch29_XMLSerializer1 has been removed from this note on November
05 2001 by Sandy Gao



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org