[xsd-users] Problem linking with VS 2008

Boris Kolpackov boris at codesynthesis.com
Mon Feb 13 07:57:20 EST 2012


Hi Thomas,

Thomas Dobroth <dobroth at gmail.com> writes:

> I'm still lost.

Perhaps an easier way to resolve this would be to modify the Google KML
extension schema. You will need to add simple types that derive from the
xs:double, xs:float, xs:boolean, and xs:integer types along these lines:

  <xs:simpleType name="double">
    <xs:restriction base="xs:double"/>
  </xs:simpleType>

Then use these derived types instead of the built-in ones in the elements
that are part of the substitution group. The result schema will be
semantically equivalent to the original but the XSD compiler will be
using class-types instead of the fundamental types in substitution
groups.


> What do I need be building a mapping for?  anySimpleType? anyType?  The  
> I map those to double?  Clearly it's not double to double.

With the mapping customization approach you need to provide a custom
mapping for xs:double, xs:float, xs:boolean, and xs:integer so that
(1) they wrap the fundamental types (C++ double, float, bool, etc.)
and (2) derive from xml_schema::simple_type. The documentation and
examples I mentioned in my previous email have more information on
how to accomplish this.

Boris



More information about the xsd-users mailing list