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

Jürgen Waser juergenwaser at gmx.at
Tue Jun 22 09:17:43 EDT 2010


In our framework, we have an XSD type hierarchy across several dlls. In 
principle, the hierarchy looks like this:

1. base.dll   has  BaseSettings.xsd
which is compiled into the dll with the following xsd args (using XSD 3.3):

SET(BASE_XSD_ARGS
     cxx-tree
     --extern-xml-schema "Schema.h"
     --hxx-suffix .h
     --cxx-suffix .cpp
     --generate-serialization
     --generate-ostream
     --generate-doxygen
     --generate-comparison
     --generate-default-ctor
     --generate-intellisense
     --function-naming java
     --type-regex "/ \(.+\)_t/\\u$1/"
     --generate-polymorphic
     --polymorphic-type-all
     --export-maps
     --include-regex "|^(.+)/(.+)|\\u$2|"
     --export-symbol BASE_DLL
     --hxx-prologue "#include <base/common/baseExport.h> "
)

2. Then we have several plugin dlls which have schemas that derive from 
BaseSettings.xsd.
e.g plugin.dll   has  PluginSettings.xsd   extends   BaseSettings.xsd
These derived schemas are compiled with:

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|"
)

3. Then we have another dll (master) which specifies a 
MasterSettings.xsd that includes the BaseSettings.xsd and all the 
derived XSDs, i.e
master.dll   has  MasterSettings.xsd   includes   BaseSettings.xsd, 
PluginSettings.xsd
MasterSettings.xsd is compiled with almost the same args as the plugin 
XSDs but extended with:

SET(MASTER_XSD_ARGS ${PLUGIN_XSD_ARGS }
     --export-symbol SERVER_DLL
     --hxx-prologue "#include <master/common/masterExport.h> "
)

=> A main executable loads all the aforementioned dlls.
=> Parsing an XML document of type MasterSettings.xsd works fine.


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'

So somehow, for dlls the derived XSDs are found, but for the executables 
they are not. This error occurs for XSD 3.2 and for XSD 3.3.
What could cause this?

Thanks for your help,
Jürgen



More information about the xsd-users mailing list