[xsd-users] Question about ID/IDREF

Boris Kolpackov boris at codesynthesis.com
Mon Sep 12 10:51:50 EDT 2005


Mickael,

Vera Mickael <vera.mickael at free.fr> writes:

> Your solution with ref-type attribute is better than using
> annotations :-)
>
> Yes I would be interested in such a feature, I'm kind on
> statically typed programmation and JAXB really lacks about
> this. It makes it really difficult to change the schema. It
> would be a feature usefull for everybody.

Ok, I will let you know when I have something for you to try.
This will most likely happen some time next week.


> I'd like to use xsd as a simple serialization tool, my point
> of view is model centric : I know the model I want (thus the
> C++ code I need) then I write the corresponding XML schema.
>
> How would you write a schema for a collection of IDREF
> without using an intermediate element ? If I use your
> exemple, I'd like to have a method like this :
>
> std::vector<book *> &
> author::recommends();

How about using IDREFS built-in type? It is a space-separated
list of IDREF. It is mapped exactly to vector<IDREF>. I will
implement ref-type attribute for both IDREF and IDREFS.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20050912/343126c0/attachment.pgp


More information about the xsd-users mailing list