Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335351 - Issue marshalling QName with "" namespace.
Summary: Issue marshalling QName with "" namespace.
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 12:33 EST by Matt MacIvor CLA
Modified: 2022-06-09 10:20 EDT (History)
0 users

See Also:


Attachments
Proposed Fix (1.05 KB, patch)
2011-01-25 14:35 EST, Matt MacIvor CLA
no flags Details | Diff
Proposed Fix and Tests (16.30 KB, patch)
2011-02-18 16:16 EST, Matt MacIvor CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt MacIvor CLA 2011-01-25 12:33:34 EST
When marshalling a QName, if the QName has "" or null for a namespace, the local name is written out as the value without a prefix. This works in most cases, however, if there's a default namespace declared somewhere above in the document, then the value will be incorrect.

EclipseLink needs to cancel out the previous default namespace declaration in the scope of this element by adding xmlns="".
Comment 1 Matt MacIvor CLA 2011-01-25 14:35:36 EST
Created attachment 187561 [details]
Proposed Fix
Comment 2 Matt MacIvor CLA 2011-01-28 12:59:11 EST
Attached path checked in to SVN
Reviewed by David McCann
Comment 3 Matt MacIvor CLA 2011-02-18 16:11:44 EST
Reopening to track an additional problem.

If there's a default namespace declared already in the document, and the owning element is in that namespace (non-prefixed), then adding the xmlns="" will break the namespace of that element.

If this situation arises, the element will have to have a prefix generated for it's namespace so that the xmlns="" can still be added to handle the namespace of the qname value.
Comment 4 Matt MacIvor CLA 2011-02-18 16:16:03 EST
Created attachment 189323 [details]
Proposed Fix and Tests
Comment 5 Matt MacIvor CLA 2011-02-22 13:46:20 EST
Updated patch checked in to SVN
Reviewed by Blaise Doughan
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:20:13 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink