[xsde-users] SimpleType with restriction creates object with empty constructor

Andrea Tessadri tessadriandrea at gmail.com
Thu Mar 28 11:51:40 EDT 2019


For a schema containing a simpleType like this:

<xs:simpleType name="CountryCodeISO">
      <xs:restriction base="xs:string">
          <xs:pattern value="[A-Z][A-Z]"/>
      </xs:restriction>
</xs:simpleType>

The result of:
xsde cxx-hybrid --generate-aggregate country.xsd

will be country.hxx containing a structure like this one:

class CountryCodeISO;

// CountryCodeISO (fixed-length)
//
class CountryCodeISO: public ::std::string
{
  public:
  CountryCodeISO ();
};

In such case there is no way to create an object of type CountryCodeISO
containing a string, since the only constructor available is the empty one.

Version: xsde-3.2.0-x86_64-linux-gnu
System: ubuntu 18.04


More information about the xsde-users mailing list