Namespace problem when serializing from JAXB 2.0
------------------------------------------------

         Key: XALANJ-2273
         URL: http://issues.apache.org/jira/browse/XALANJ-2273
     Project: XalanJ2
        Type: Bug
  Components: Xalan, Serialization  
    Versions: 2.7, Latest Development Code    
 Environment: Windows XP Pro
java version "1.5.0_06"
JAXB 2.0 EA3
Xerces 2.7.1
Xalan 2.7.0 and trunk
    Reporter: Golgoth 14
    Priority: Minor


The marshalling of a JAXB object created by the parsing of  XML data with the 
Xerces parser
gives two differents results if  the classpath contains only xerces.jar or if 
it contains xerces.jar, xalan.jar and serializer.jar.

1) Classpath with xerces only :
     [java] <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     [java] <dataDetail xmlns="http://my.namespace.com/a"; name="datadetail-001">
     [java]     <data id="data-001">
     [java]         <n:test xmlns:n="http://my.namespace.com/n";>data</n:test>
     [java]     </data>
     [java]     <data id="data-002">
     [java]         <n:test xmlns:n="http://my.namespace.com/n";>data</n:test>
     [java]     </data>
     [java] </dataDetail>

2) Classpath with xerces, xalan and serializer :
     [java] <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     [java] <dataDetail xmlns="http://my.namespace.com/a"; name="datadetail-001">
     [java]     <data id="data-001">
     [java]         <n:test xmlns:n="http://my.namespace.com/n";>data</n:test>
     [java]     </data>
     [java]     <data id="data-002">
     [java]         <test xmlns:ns2="http://my.namespace.com/a"; xmlns="" 
xmlns:n="http://my.namespace.com/n";>data</test>
     [java]     </data>
     [java] </dataDetail>

I've make test with the released and with the trunk versions of Xalan.

First, I had posted this bug on the JAXB issue tracker but the JAXB team 
investigations indicated that the problem came from Xalan.

I've a full test case that you could run with ANT. I will try to attach it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to