[xsd-users] Parsing exception with XSD hierarchy - No type information available for a type

Boris Kolpackov boris at codesynthesis.com
Tue Jun 22 14:18:58 EDT 2010


Hi Jürgen,

Jürgen Waser <juergenwaser at gmx.at> writes:

> SET(PLUGIN_XSD_ARGS
>     cxx-tree
>     --extern-xml-schema "Schema.h"
>     --hxx-suffix .h
>     --cxx-suffix .cpp
>     --generate-serialization
>     --generate-ostream
>     --generate-doxygen
>     --generate-default-ctor
>     --generate-intellisense
>     --generate-wildcard
>     --function-naming java
>     --type-regex "/ \(.+\)_t/\\u$1/"
>     --polymorphic-type-all
>     --generate-polymorphic
>     --import-maps
>     --include-regex "|^(.+)/(.+)|\\u$2|"
> )

I see that you don't have --export-symbol option for schemas that
you put in plugin DLLs. This will most likely cause problems. You
will need to have a separate export symbol for each DLL and define
it accordingly when building such DLLs.


> Now the problem:
> -------------------
>
> Recently we have introduced unit tests into the framework. A unit test  
> is an executable, e.g test.exe (and NOT a dll) and has a schema that  
> derives from BaseSettings.xsd too. i.e
>
> test.exe  has  TestSettings.xsd  extends  BaseSettings.xsd
>
> TestSettings.xsd is compiled with the same arguments as the plugin XSDs  
> (PLUGIN_XSD_ARGS).
>
> => test.exe  loads the base.dll and master.dll.
> => Parsing an XML of type MasterSettings FAILS with the following exception:
>
> 'No type information available for a type: No type information available  
> for TestSettings.xsd'

Provided that you fix the problem mentioned above, I don't see why
you get this error. Generally, to make sure that polymorphism maps
work correctly across DLLs, you will need to do the following:

1. Have a 'root' DLL with schemas compiled with the --export-maps.

2. All 'derived' DLLs with schemas should be compiled with --import-maps
   and linked to the root DLL.

3. All executables with schemas should be compiled with --import-maps
   and linked to the root DLL. 

Boris



More information about the xsd-users mailing list