DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16235

String comparison is errorneous if used with serialization

           Summary: String comparison is errorneous if used with
                    serialization
           Product: Xerces2-J
           Version: 2.2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XNI
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


class  ---> org.apache.xerces.dom.CoreDocumentImpl
method ---> protected final void checkDOMNSErr(String prefix, String namespace);

the comparisons of the namespace (namespace != NamespaceContext.XMLNS_URI)
does not work with deserialized objects. A org.w3c.dom.DOMException: 
NAMESPACE_ERR is raised allways.

Sample to reconstruct the problem

String test = "<aprefix:atag 
xmlns:aprefix=\"http://www.w3.org/2000/09/xmldsig#\";>some data</aprefix:atag>";
Document parsedDoc = ... parse test and aquire a DOM-Document
....
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(1024);
ObjectOutputStream outputStream = new ObjectOutputStream(byteArrayOutputStream);
outputStream.writeObject(parsedDoc.getDocumentElement());
ObjectInputStream inputStream = new ObjectInputStream(new ByteArrayInputStrea
((byteArrayOutputStream.toByteArray()));
Element element = (Element) inputStream.readObject();
Document emptyDoc = new org.apache.xerces.dom.DocumentImpl();
emptyDoc.importNode(element, true); //---> Exception is raised

My enviroment:
JDK 1.4.1_01 (Win32)

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

Reply via email to