elena       2002/08/15 13:43:57

  Modified:    java/src/org/apache/xml/serialize XMLSerializer.java
  Log:
  Bug fix in namespace alg. Added setNamespace method to allow turning on namespace
  support from XMLSerializer (temporary solution -- in long term users should move 
using DOMWriter)
  
  Revision  Changes    Path
  1.43      +14 -4     xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java
  
  Index: XMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- XMLSerializer.java        14 Aug 2002 22:51:09 -0000      1.42
  +++ XMLSerializer.java        15 Aug 2002 20:43:57 -0000      1.43
  @@ -227,7 +227,17 @@
       }
   
   
  -
  +    /**
  +     * This methods turns on namespace fixup algorithm during
  +     * DOM serialization.
  +     * @deprecated -- functionality could be removed
  +     * @see org.w3c.dom.ls.DOMWriter     
  +     * 
  +     * @param namespaces
  +     */
  +    public void setNamespaces (boolean namespaces){
  +        fNamespaces = namespaces;
  +    }
   
       //-----------------------------------------//
       // SAX content handler serializing methods //
  @@ -1051,7 +1061,7 @@
   
                       // data
                       int colon = name.indexOf(':');
  -                    if (colon < 0) {
  +                    if (colon > -1 ) {
                           if (fDOMErrorHandler != null) {
                               modifyDOMError("DOM Level 1 Node: "+name, 
                                              DOMError.SEVERITY_ERROR, attr);
  @@ -1060,8 +1070,8 @@
                                   // stop the namespace fixup and validation
                                   throw new RuntimeException("Stopped at user 
request");
                               }
  -                            printAttribute (name, value, attr.getSpecified());
                           }
  +                        printAttribute (name, value, attr.getSpecified());
                       } else { // uri=null and no colon
   
                           // no fix up is needed: default namespace decl does not 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to