axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding SerializationContextImpl.java
Date Fri, 16 Aug 2002 17:37:02 GMT
rubys       2002/08/16 10:37:02

  Modified:    java/src/org/apache/axis/encoding
                        SerializationContextImpl.java
  Log:
  Performance
  
  Revision  Changes    Path
  1.56      +10 -6     xml-axis/java/src/org/apache/axis/encoding/SerializationContextImpl.java
  
  Index: SerializationContextImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/SerializationContextImpl.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- SerializationContextImpl.java	16 Aug 2002 16:41:34 -0000	1.55
  +++ SerializationContextImpl.java	16 Aug 2002 17:37:02 -0000	1.56
  @@ -837,7 +837,7 @@
       public void startElement(QName qName, Attributes attributes)
           throws IOException
       {
  -        java.util.Vector vecQNames = new java.util.Vector();
  +        java.util.ArrayList vecQNames = null;
           if (log.isDebugEnabled()) {
               log.debug(JavaUtils.getMessage("startElem00",
                       "[" + qName.getNamespaceURI() + "]:" + qName.getLocalPart()));
  @@ -890,7 +890,11 @@
                       if(qname.equals(""))
                           qname = attributes.getLocalName(i);
                   }
  -                vecQNames.add(qname);
  +
  +                if (qname.startsWith("xmlns")) {
  +                  if (vecQNames == null) vecQNames = new ArrayList();
  +                  vecQNames.add(qname);
  +                }
                   writer.write(qname);
                   writer.write("=\"");
                   writer.write(XMLUtils.xmlEncodeString(attributes.getValue(i)));
  @@ -906,12 +910,12 @@
                   sb.append(":");
                   sb.append(map.getPrefix());
               }
  -            if(vecQNames.indexOf(sb.toString())==-1){
  +            if ((vecQNames==null) || (vecQNames.indexOf(sb.toString())==-1)) {
                   writer.write(" ");
  +                sb.append("=\"");
  +                sb.append(map.getNamespaceURI());
  +                sb.append("\"");
                   writer.write(sb.toString());
  -                writer.write("=\"");
  -                writer.write(map.getNamespaceURI());
  -                writer.write("\"");
               }
           }
   
  
  
  

Mime
View raw message