bruno       2003/03/10 03:12:46

  Modified:    src/java/org/apache/cocoon/xml/dom DOMStreamer.java
  Log:
  Fixing the original cause of the NPE temporarely fixed by Sylvain in version 1.2 of 
this file.
  
  Revision  Changes    Path
  1.3       +5 -7      cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java
  
  Index: DOMStreamer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMStreamer.java  9 Mar 2003 20:38:30 -0000       1.2
  +++ DOMStreamer.java  10 Mar 2003 11:12:46 -0000      1.3
  @@ -163,7 +163,7 @@
   
           defaultDOMStreamer.setLexicalHandler(handler);
           namespaceNormalizingDOMStreamer.setLexicalHandler(handler);
  -    } 
  +    }
   
       /**
        * Start the production of SAX events.
  @@ -284,7 +284,7 @@
   
                   pos = nextNode;
               }
  -            
  +
               if (isDoc) {
                contentHandler.endDocument();
               }
  @@ -404,7 +404,8 @@
                                       else {
                                           if (attr.getPrefix() != null && declaredUri 
== null) {
                                               // prefix is not null and is not yet 
declared: declare it
  -                                            currentElementInfo.put(prefix, 
attr.getNamespaceURI());
  +                                            attrPrefix = attr.getPrefix();
  +                                            currentElementInfo.put(attrPrefix, 
attr.getNamespaceURI());
                                           } else {
                                               // attribute has no prefix (which is 
not allowed for namespaced attributes) or
                                               // the prefix is already bound to 
something else: generate a new prefix
  @@ -545,9 +546,6 @@
                * an existing one.
                */
               public void put(String prefix, String namespaceURI) {
  -             // FIXME (SW): it appears that prefix can be null (reported by Michael 
Wechner)
  -             if (prefix == null) return;
  -             
                   if (namespaceDeclarations == null)
                       namespaceDeclarations = new HashMap();
                   namespaceDeclarations.put(prefix, namespaceURI);
  
  
  

Reply via email to