[xsd-users] Re: Xsd information

Boris Kolpackov boris at codesynthesis.com
Thu Jun 8 15:47:46 EDT 2006


Hi Anatolii,

I've CC'ed xsd-users mailing list. This way others can benefit from the
information.

Anatolii.Belomestnov at ubs.com <Anatolii.Belomestnov at ubs.com> writes:


> I have a couple of questions about the XSD product:
>
> *	I am trying to use visual studio .net 2003 with a Linux/C++
> project (accessing everything from network drive), most visual studio
> intellisense works pretty well except for XSD generated classes. It
> would be great if all underlying functors, containers, accessors, etc.
> would all show up  - would make it much easier to xsd. I think this is
> more like essential to have.

I just tracked this problem down. Apparently VC++ 2003 Intellisense cannot
handle this style of putting const:

void f (string const&)

The fix is straightforward but extensive; I will try to make it for the
next release.


> *	How hard it would be to make the generated code use some
> specific auto pointer, like boost's shared_ptr?

Not hard though there is not much gain from doing this, IMO. The only
(public) interface that exposes std::auto_ptr are parsing functions.
You can always do something like this:

auto_ptr<Foo> ap (foo ("foo.xml"));
shared_ptr<Foo> sp (au.release ());

Also, shared_ptr in the latest boost (1.33.1) has a constructor from
std::auto_ptr, so the above becomes:

auto_ptr<Foo> ap (foo ("foo.xml"));
shared_ptr<Foo> sp (au);

You cannot write this, however:

shared_ptr<Foo> sp (foo ("foo.xml"));


> *	I saw the tree mapping manual
> (http://codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#1.
> 1.2) but would like to see the complete guide to what kind of accessors
> are generated for what types of xsd so that it's more streamlined to
> program in it.

I believe the C++/Tree manual is quite complete. It describes every XML
Schema construct for which there is C++ mapping. Here are the main parts:

Section 2.4 - Namespaces
Section 2.5 - Built-in types
Section 2.6 - Simple types
Section 2.7 - Complex types
Section 2.8 - Local Elements and Attributes

  In particular,

  Section 2.8.1 describes accessors/modifiers for minOccurs=1 maxOccurs=1
  Section 2.8.2 describes accessors/modifiers for minOccurs=0 maxOccurs=1
  Section 2.8.3 describes accessors/modifiers for maxOccurs=unbounded

Section 3   - Mapping for global elements to parsing functions
Section 4   - Mapping for global elements to serialization functions

Can you point me to the places where you believe the documentation
is not complete? You implying that it is not complete really hurts
my feelings ;-)

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/20060608/97d441d0/attachment.pgp


More information about the xsd-users mailing list