@@isPresent element in XML Composer step for optional groups
Posted: Mon Nov 06, 2017 12:30 pm
Hi,
I have to create an XML based on the xsd supplied by the end client.
its looks something like the below format.
Form-Id and Insurance-Type fields are mandatory but the 'health-History" group is optional since all of its child elements are of min occurrence=0.
when I imported xsd supplied from the end client in the assembly editor, there is a "@@ispresent" element appearing under the 'health-history' element, which means data stage also identified this 'Health history' group as an optional element.
however, when I passed null values for this group, the outpt XML file still displays this group. the results are displayed with "xsi:nil="true"/" for next to the column names.
Can some one please help me configure, this xml composer job to drop this optional group in the output, whenever the corresponding columns have no data?
I have to create an XML based on the xsd supplied by the end client.
its looks something like the below format.
Code: Select all
<xs:element name="HealthForm">
<xs:complexT ype>
<xs:sequence>
<xs:element name="Form-ID"
<xs:element name="Insurance-Type"
<xs:element name="Health-History" >
<xs:complexType>
<xs:sequence>
<xs:element name="Existing ailment" type="xs:string" minOccurs="0"/>
<xs:element name="Number of insurance claims" type="xs:in t" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
when I imported xsd supplied from the end client in the assembly editor, there is a "@@ispresent" element appearing under the 'health-history' element, which means data stage also identified this 'Health history' group as an optional element.
however, when I passed null values for this group, the outpt XML file still displays this group. the results are displayed with "xsi:nil="true"/" for next to the column names.
Can some one please help me configure, this xml composer job to drop this optional group in the output, whenever the corresponding columns have no data?