[xsd-users] Question about ID/IDREF

Vera Mickael vera.mickael at free.fr
Mon Sep 12 11:57:07 EDT 2005


Boris Kolpackov a écrit :
> 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.

Great :-)

I'll try your product tonight.

Mickaël



More information about the xsd-users mailing list