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

Bug 348001

Summary: [Validation] @XmlSchemaType validation and content assist
Product: [WebTools] Dali JPA Tools Reporter: Paul Fullbright <paul.fullbright>
Component: JAXBAssignee: Neil Hauge <neil.hauge>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge
Version: 3.0Keywords: plan
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Paul Fullbright CLA 2011-06-01 15:31:48 EDT
There currently exists no validation for @XmlSchemaType.

From the 2.2 spec (8.6.4.2):

The following mapping constraints must be enforced:
- name() must be an atomic simple type schema type (or a type that derives
from it) to which the type of the property or field can be mapped from
XML Schema -> Java as specified in Section 6.2.2, “Atomic Datatype”.
- If the annotation is used as a package level annotation or within
@XmlSchemaTypes, value of @XmlSchemaType.type() must be
specified and must be the Java type that is being customized.
- If the annotation is used on a field or a method, then value of type() must
be DEFAULT.class.

In addition, there should be validation that the schema type referenced can be resolved.
Comment 1 Paul Fullbright CLA 2011-06-01 15:40:57 EDT
There should also be content assist for:
- name()
- namespace()
Comment 2 Paul Fullbright CLA 2011-10-26 11:31:03 EDT
name and namespace validation and content assist was added with general QName support.

Also added
- namespace/name must resolve to simple type
- when defined on attribute, type may not be specified
- when defined on package, type must be specified

Committed for 3.1 M3