[xsd-users] error while using "xsd cxx-tree"

Boris Kolpackov boris at codesynthesis.com
Wed Feb 11 01:16:01 EST 2009


Hi Sharda,

sharda saiwan <shardasaiwan at gmail.com> writes:

> lfb.xsd:184:61: warning F001: element 'optional' is implicitly of anyType
> lfb.xsd:184:61: info: did you forget to specify 'type' attribute?
>
> [...]
>
> lfb.xsd:494:55: warning F001: element 'eventLessThan' is implicitly of
> anyType

This set of warnings tells you that a bunch of elements in your schema
don't have the 'type' attribute and default to being of the xsd:anyType 
built-in XML Schema type. If this is intentional then you can disable
these warnings by adding 

--disable-warning F001

to the XSD command line.


> lfb.xsd:486:55: warning B101: substitution groups are used but
> --generate-polymorphic was not specified
> lfb.xsd:486:55: info: generated code may not be able to parse some
> conforming instances

This warning tells you that your schema uses polymorphism but the
generated code will be polymorphism-unaware unless you specify the
--generate-polymorphic option. For more information on support for
XML Schema polymorphism, see Section 2.11, "Mapping for xsi:type
and Substitution Groups" in the C++/Tree Mapping User Manual:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.11


> lfb.xsd:7:39: error: unable to map XML Schema namespace
> 'urn:ietf:params:xml:ns:forces:lfbmodel:1.0' to C++ namespace
> lfb.xsd:7:39: info: use the --namespace-map or --namespace-regex option to
> provide custom mapping

This error tells you that the XSD compiler does not know how to map
the urn:ietf:params:xml:ns:forces:lfbmodel:1.0 XML namespace to C++
namespace. You can use the --namespace-map option to provide a mapping,
for example:

--namespace-map urn:ietf:params:xml:ns:forces:lfbmodel:1.0=lfb1_0

See Section 3.3, "Namespace Mapping" in the C++/Tree Mapping Getting
Started Guide for details:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#3.3

Boris




More information about the xsd-users mailing list