[xsde-users] Empty cpp generated depending on location of type definition

Vrijnsen, Jeroen jeroen.vrijnsen at philips.com
Thu Feb 9 04:53:03 EST 2017


Hi,

I have the following XSD schemas:

LrimResponseSchema.xsd:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:include schemaLocation="LrCommonDataTypesSchema.xsd"/>

  <xs:element name="LrimResponse" type="LrimType" />

  <!-
  <xs:element name="LrimResponse">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="LrimPng" type="xs:base64Binary" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
-->
</xs:schema>

And LrCommonDataTypesSchema.xsd:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:include schemaLocation="CommonDataTypesSchema.xsd"/>
  <xs:include schemaLocation="SdssCommonDataTypesSchema.xsd"/>

  <xs:complexType name="LrimType">
    <xs:sequence>
      <xs:element name="LrimPng" type="xs:base64Binary" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>

When I generated code for LrimResponseSchema.xsd, using
$XSDE cxx-hybrid \
    --generate-parser \
    --generate-serializer \
    --generate-aggregate \
    --generate-polymorphic \
    --char-encoding utf8 \
    --root-element-first \
    --hxx-suffix .h \
    --cxx-suffix .cpp \
    --namespace-map = ::xsdegeneratedcode::xml \
    --output-dir components/xsdegeneratedcode/target/generated_source \
    components/xsdegeneratedcode/source/LrimResponseSchema.xsd

the resulting LrimResponseSchema.cpp has no content other than namespace declarations. However, when I update LrimResponseSchema.xsd to inline the type-defintion of LrimType (commented block in above sample),
correct code is generated.
What can I do to have correct code generated for the situation where LrimType is declared in the separate XSD file (as it's used somewhere else as well)??

Kind regards,

Jeroen Vrijnsen


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.


More information about the xsde-users mailing list