[xsd-users] Problems with generated schema

Boris Kolpackov boris at codesynthesis.com
Mon Jul 23 16:54:57 EDT 2007


Hi Olaf,

ope <ope-devel at gmx.de> writes:

> I did try the 3rd Option without success.

What exactly happens? Do you still get validation errors?


> metalink_parser::metalink_parser() {
>     m_metalink_props.schema_location (
>         "http://www.metalinker.org/",
>         "file:///home/ope/Projects/cpp/test/schema/metalink.xsd");
>
>     m_metalink_props.no_namespace_schema_location (
>         "file:///home/ope/Projects/cpp/test/schema/metalink.xsd");
> }

The no_namespace_schema_location call is not necessary since your
schema has a namespace.


> metalink_parser::metalink_parser(const std::string& file){
>     m_metalink_files.push_back(file);
> }

This c-tor does not initialize m_metalink_props. If you are
using this c-tor to create a metalink_parser object then
this would explain why things still do not work.


> If I disable validation (1st Option) no output is performed.

You mean there is no errors or you don't get the output that
you expected?

If none of the above help, could you send a complete test driver,
including code that instantiates metalink_parser, so that I can
take a look.

hth,
-boris




More information about the xsd-users mailing list