users@jaxb.java.net

IDREF

From: Mark Emeny <Mark.Emeny_at_focus-solutions.co.uk>
Date: Wed, 15 Nov 2006 15:35:51 -0000

Hi,

 

I have the following field:

 

       @XmlIDREF

       @XmlElement(name = "OwnedItem")

       private Set<OwnedItem> ownedItems;

 

and I'm expecting an element named "OwnedItem" with a type of xs:IDREF.
Instead, the IDREF annotation is ignored and I am left with a simple
element named OwnedItem.

 

The documentation says these two annotations are compatible. I can only
get it working the way I want if I omit the XmlElement annotation (but
then I have no control over the name of the element).

 

Any ideas?

 

Many thanks,

 

Mark Emeny.