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

Bug 336259

Summary: [Validation] @XmlList validation enhancements
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JAXBAssignee: Paul Fullbright <paul.fullbright>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge, paul.fullbright
Version: 3.0Keywords: plan
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Karen Butzke CLA 2011-02-03 11:44:22 EST
XmlList model support was added in bug 326718. 1 validation error that we need is that the attribute must map to a simple type. Examples from the JAXB spec:

// Examples: Legal usage of @XmlList
@XmlList List<Integer> foo; // int maps to xs:int
@XmlList String[] foo; // String maps to xs:string
@XmlList List<Bar> foo; // only if Bar maps to a simple type


// Example: Illegal usage of @XmlList
public class Foo {
    // @XmlValue maps List to a XML Schema list simple type
    @XmlValue List<Integer> a;
}
class Bar {
    // Use of @XmlList is illegal since Foo itself mapped
    // to a XML Schema list simple type; XML Schema list simple
    // type can't derive from another XML Schema list simple type
    @XmlList List<Foo> y;
}
Comment 1 Paul Fullbright CLA 2011-10-27 18:31:24 EDT
Added for 3.1 M3.