Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328516

Summary: minor inconsistencies between oxm annotations and the oxm schema
Product: z_Archived Reporter: Karen Butzke <karenfbutzke>
Component: EclipselinkAssignee: David McCann <david.mccann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david.twelves, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Supporting tests none

Description Karen Butzke CLA 2010-10-22 17:17:48 EDT
A lot of these are new in 2.2, so I assume they can be changed to be consistent, but I could of course be wrong:

1. XmlIsSetNullPolicy.isSetMethodParameters() does not exactly match the xsd is-set-parameters

2. XmlTransformation.optional() default is true. In the xsd the default is false.

3. XmlWriteTransformer.xpath() is xml-path in the xsd. Should also be set to required in the xsd since it is required in the java annotation.

4. I think it's too late on this one : xml-element-decl has attributes defaultValue, substituionHeadName, substitutionHeadNameSpace instead of using '-' for the xml names.

4. in several places the xsd attributes are not marked as required: 
a. xml-element-decl -> name
b. xml-java-type-adapter -> value
c. xml-inverse-reference -> mapped-by
d. in xml-is-set-null-policy 
      is-set-parameter -> value, type
      is-set-method-name
Comment 1 David McCann CLA 2010-11-17 12:52:54 EST
Here's what I plan on doing:

1) The annotation will be changed to match, i.e. XmlIsSetNullPolicy.isSetParameters()

2) The XSD will default to true

3) i) The method will match the corresponding XSD attribute, i.e. 'xmlPath'
  ii) We will set the xml-path attribute to required in the XSD

4) Too late to change this.

5) All will be set to required in XSD

6) We will default the marshal null representation on abstract null policy to  "ABSENT_NODE".
Comment 2 David McCann CLA 2010-11-17 14:22:33 EST
Created attachment 183332 [details]
Proposed fix
Comment 3 David McCann CLA 2010-11-17 14:23:06 EST
Created attachment 183333 [details]
Supporting tests
Comment 4 David McCann CLA 2010-11-19 12:26:54 EST
Fix for Bug 328516 - minor inconsistencies between oxm annotations and the oxm schema

Reviewed by:  matt.macivor@oracle.com

Tests: all unit tests pass as expected; jax/annotations/xmlnullpolicy; jaxb/annotations/xmltransformation

Revision: 8527
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:08:42 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink