On Fri, 05 Nov 2004 22:17:34 -0600
Keith Visco <[EMAIL PROTECTED]> sed :
>
>
> Saravanan Subbiah wrote:
> > Hi all,
> >
> > I am trying to see find XSD Key and KeyRef support in castor. I
> > see that castor generates KeyRef classes. But does it actually
> > validates it?
> >
> > I think no. I wrote a test program which adds an invalid reference
> > and tried to Marshal it and it went thru fine !
>
>
>
> No, Key and Keyref are not supported. Only ID and IDREF at this time,
> which of course limits the ID to be globally unique. It shouldn't take
> much to add the Key / Keyref support but there is no one available to
> work on it at the moment.
Can you please let me know where to start looking to implementing this
? I can give it a shot if I get some time.
I also want to be able to easily get the refered Object from the KeyRef
and Key Object from the refered Object. That way the application doesn't
have to maintain any hashmaps for such traversal.
Something like
Order o = (Order) orderKeyRef.getReferedObject();
and
OrderKeyRef okr = (OrderKeyRef) order.getKeyRef();
I am not sure how difficult it is to implement this. Any thoughts on
this ?
>
>
> > Is there any standard way of do this ? Is there any other product
> > like castor out there which could do this ?
>
> I'm not sure if Sun's JAXB supports it yet, but you could always check
> there.
The current 1.4 JWSD which contains the JAXB implementation doesn't seem
to support this either.
thanks,
--
Saravanan Subbiah
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev