Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348001 - [Validation] @XmlSchemaType validation and content assist
Summary: [Validation] @XmlSchemaType validation and content assist
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-06-01 15:31 EDT by Paul Fullbright CLA
Modified: 2011-10-26 11:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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