| Summary: | Marshalling node with no namespace should clear default namespace if necessary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> | ||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | eclipselink.oxm-inbox | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 185148 [details]
MOXy - Test Cases
Created attachment 185149 [details]
Core - Fix
DOMReader - In getQName(Element), the handlePrefixedAttribute(Element) method is now called even if the element does not have a prefix. This is to handle the default namespace use case DomToXMLEventWriter - Needed to get the default namespace before the element was created. This is because if the element was created in the default namespace it would blow aware what the default namespace had previously been. XMLFragmentReader - Guard against a null NamspaceResolver being passed to the constructor - When resolving a namespace, the default namespace on the NamespaceResolver is also checked. NamespaceResolver - If the prefix passed to the put operation is null/"", set the uri as the default namespace on the NamespaceResolver. NodeRecord - When performing startPrefixMappings recognize that you may need to declare the default namespace as no namespace "". OutputStreamRecord/WriterRecord - If the prefix is null/"" and there is no namespace URI then declare the "" namespace. SAXDocumentBuilder - If the prefix or URI are null, convert then to "". Fix checked into trunk at rev: 8708 Code reviewed by: Matt MacIvor Created attachment 185343 [details]
Core - Fix (to address SDO test failures)
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
If a node value is being marshalled that is not namespace qualified, if it is being written to an XML document with a default namespace declaration then it should clear it: If: <bar>Hello World</bar> Is being marshalled into the following doc: <foo xmlns="urn:foo"> </foo> Then the result should be: <foo xmlns="urn:foo"> <bar xmlns="">Hello World</bar> </foo>