There are 44 built-in XML Schema types. Table 4 illustrates how HydraExpress maps XML Schema types to Standard C++ Library types and SourcePro C++ types.
By default, HydraExpress links to Standard C++ Library types. To link to SourcePro C++ types, use the -sourcepro option when invoking the code generator.
To view the descriptions of SourcePro C++ classes, follow the links below which lead to the SourcePro C++ documentation.
HydraExpress initializes built-in schema types to a reasonable value. If the type has a default value associated with it, HydraExpress uses the default value from the schema to initialize the type. Table 5 lists the default value for each of the default C++ types.
The default values for a type can be configured by modifying the configuration file, as described in Section 8.8.2.
An element or attribute that does not specify a type defaults to type anyType (the ur-type). You can also explicitly specify that an attribute or element is of type anyType. By default, HydraExpress maps an anyType to a C++ string type. Because the element is a type with unknown contents and structure, HydraExpress cannot create a fixed binding for the element. Therefore, HydraExpress makes no attempt to parse the contents of an element of type anyType. Instead, HydraExpress returns the contents of this element verbatim as an instance of the type mapped to xsd:string, typically std::string or RWCString.
The type anySimpleType is comparable to anyType, except for the following:
it is always explicitly specified
the permissible values for an element of anySimpleType is the union of permissible values for all built-in types
Like for anyType, HydraExpress creates a member as an instance of the type mapped to xsd:string, typically std::string or RWCString, and makes no attempt to parse the contents of the element.
HydraExpress provides an isValid() method in each generated class for checking that the data in elements with a restricted simpleType conforms to the restrictions. For information on this method, see Section 2.4.2, "Instance Document Validation." For an example of using isValid(), see Section 3.6.3, "Validating the Instance Document."
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.