Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question XML filter [if element exists or not]

More
15 May 2015 19:53 #1 by TAOUILI
XML filter [if element exists or not] was created by TAOUILI
Hi,

I have a XML as source in my mapping, for a choice i have 2 elements like :
<xsd:choice>
<xsd:element name="Air" type="tns:AirType"/>
<xsd:element name="Sea" type="tns:SeaType"/>
</xsd:choice>
for the AirType i have :
<xsd:complexType name="AirType">
<xsd:complexContent>
<xsd:sequence>
<xsd:element name="AirField1" type="xsd:string"/>
<xsd:element name="AIrField2" type="xsd:string"/>
...
and for SeaType i have :
<xsd:complexType name="SeaType">
<xsd:complexContent>
<xsd:sequence>
<xsd:element name="SeaField1" type="xsd:string"/>
<xsd:element name="SeaField2" type="xsd:string"/>
...
My question is, how to test if air exists or sea (AirField1 or SeaField1), I tried to xml\inv\air = (<>) null and sometgings like this but it doesn't work.
FYI: when i'm sure that my xml is sea i can test on SeaField1 = a one particular value but with not null it doesn't work.

Thanks in advance.
More
18 May 2015 15:18 #2 by Thomas BLETON
Replied by Thomas BLETON on topic XML filter [if element exists or not]
Hi,
Did you try using "IS NULL" or "IS NOT NULL" ?
I invite you to try it, and open the generated process to understand where the filter takes place.