[xsd-users] Differencies between xsd and xsde

Klaim - Joël Lamotte mjklaim at gmail.com
Tue Jun 14 07:39:40 EDT 2011


Thank you for your

2011/6/14 Boris Kolpackov <boris at codesynthesis.com>

>
> > Are there other differences?
>
> Compared to XSD, XSD/e is more light-weight but also not as powerful as
> XSD. Some of the more advanced/convenience features found XSD are not
> available in XSD/e.
>
>
I've tried to naively convert my current xsd use to xsde and now I see wich
features I use that xsde don't provide. The main problem I have with xsd is
that I'm having trouble organising CMake, xsd and Xerces to work together as
the xsd CMake files don't seem to be enough to make sure Xerces is available
on Windows. It's another problem anyway.


>
> > Maybe in the kind of interfaces generated?
>
> C++/Hybrid in XSD/e is similar but not the same as C++/Tree in XSD.
>
>
I've just looked at the generated code. Obviously it's far easier to read
for people not used to STL/Boost libs interfaces.
That's really an excellent idea to provide xsd AND xsde, fills all the needs
I guess.


>
> > Last question : I don't find a way to specify something else than
> auto_ptr
> > as smart-pointer type for root objects.
> > Is there a way? I'd like to use std::unique_ptr (I'm using recent
> compilers)
> > or std::shared_ptr.
>
> This is a question about XSD, not XSD/e, right? XSD/e does not use
> auto_ptr.
>
>
Oh ok, that's not what I understood. I've seen some references to smart
pointer somewhere in the docs, but I might have mixed up.



> There is no way to change that in XSD but you can always "strip off"
> auto_ptr with the release function. Let's say root() is the parsing
> function. Then you can write:
>
> std::unique_ptr<root_t> r (root (...).release ());
>
> Also, std::shared_ptr has a constructor that takes std::auto_ptr. So
> you don't even need to call release() in this case:
>
> std::shared_ptr<root_t> r (root (...));
>

Ok that's what I use at the moment, I just thought you would provide a way
to specify a poitner type replacement. But I see Ivan's mail with a patch so
I guess it's a wanted feature.


Thank you, you've been really helpful :)

Joël Lamotte


More information about the xsd-users mailing list