[xsd-users] Constructors from xercesc::DOMAttr and std::wstring missing from generated custom type

Jeroen N. Witmond [Bahco] jnw at xs4all.nl
Tue Sep 11 09:56:47 EDT 2007


Hi Boris,

In using the custom type generated by xsd (see my previous email) in
'real' code, I ran into a problem.

The Schema I use contains the following fragment:

  <xs:simpleType name="pubIdChars">
    <!-- A string of the characters defined as pubIdChar in production 13
         of the Second Edition of the XML 1.0 Recommendation. Does not
include
         the whitespace characters because they're normalized by XML
parsing. -->
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z0-9\-'\(\)+,./:=?;!*#@$_%]*"/>
    </xs:restriction>
  </xs:simpleType>

This generates the following code:

    pubIdChars::
    pubIdChars (const ::xercesc::DOMAttr& a,
                ::xml_schema::flags f,
                ::xml_schema::container* c)
    : ::xml_schema::string (a, f, c)
    {
    }

    pubIdChars::
    pubIdChars (const ::std::wstring& s,
                const ::xercesc::DOMElement* e,
                ::xml_schema::flags f,
                ::xml_schema::container* c)
    : ::xml_schema::string (s, e, f, c)
    {
    }

However, the code for wrapper_type, the custom type generated from
XmlNamespace.xsd, does not contain constructors with xercesc_2_7::DOMAttr
or std::wstring as first argument.

Do you have a way out of this problem?

Thanks,

Jeroen.





More information about the xsd-users mailing list