axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding SerializationContext.java
Date Fri, 26 Oct 2001 22:38:36 GMT
gdaniels    01/10/26 15:38:36

  Modified:    java/src/org/apache/axis/encoding SerializationContext.java
  Log:
  Preserve namespace mappings which were already in the DOM we're writing.
  
  Revision  Changes    Path
  1.48      +9 -1      xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java
  
  Index: SerializationContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- SerializationContext.java	2001/10/26 18:18:59	1.47
  +++ SerializationContext.java	2001/10/26 22:38:36	1.48
  @@ -504,8 +504,16 @@
               for (int i = 0; i < attrMap.getLength(); i++) {
                   Attr attr = (Attr)attrMap.item(i);
                   String tmp = attr.getNamespaceURI();
  -                if ( tmp != null && tmp.equals(Constants.NS_URI_XMLNS) )
  +                if ( tmp != null && tmp.equals(Constants.NS_URI_XMLNS) ) {
  +                    String prefix = attr.getLocalName();
  +                    if (prefix != null) {
  +                        if (prefix.equals("xmlns"))
  +                            prefix = "";
  +                        String nsURI = attr.getValue();
  +                        registerPrefixForURI(prefix, nsURI);
  +                    }
                       continue;
  +                }
   
                   attributes.addAttribute(attr.getNamespaceURI(),
                                           attr.getName(),
  
  
  

Mime
View raw message