[xsd-users] cxx-parser: include directive in --type-map file is ignored

Boris Kolpackov boris at codesynthesis.com
Mon May 5 16:15:11 EDT 2008


Hi Jeroen,

Jeroen N. Witmond [Bahco] <jnw at xs4all.nl> writes:

> For instance, when I add 'include "blahblah.hpp";' at the top of file
> parser-anytype/w3.org-xml-1998.map [1], the generated code does not
> change.

You need to add the include directive in the namespace block (constructs
at the top level are applied to schemas without target namespace). For
example, I tried this type map:

namespace "http://www.w3.org/XML/1998/namespace"
{
  include "foo.hxx";

  lang  std::string;
  space std::string;
}

And got #include "foo.hxx" in the generated header file.

Boris




More information about the xsd-users mailing list